let environment_as_list e = let rec conv acu = function | EEmpty -> acu | EEnvFrame (env, name, v) -> conv ((name, v)::acu) env in conv [] e