let lambda f =
fun ~var_count ->
let var_name = sprintf "var%d" var_count in
let var_repr = fun ~var_count -> SP.string var_name in
let applied = f var_repr ~var_count:(var_count + 1) in
entity SP.(string "λ" ^^ string var_name ^^ string "→" ^^ applied)