let lambda f =
fun ~var_count ->
let var_name = sprintf "var%d" var_count in
let var_repr = fun ~var_count -> `String var_name in
let applied = f var_repr ~var_count:(var_count + 1) in
`Assoc [
"lambda", `String var_name;
"body", applied;
]