let infer_program env = List.fold_left (fun (env, acu) b -> let env, f = bind env b in env, (fun c -> acu (f c))) (env, fun c -> c)