8 ~printer:(fun x-> (Std.dump (List.map Ast.to_string_stmt x) ^ "\n"))
11 test closure_with_args =
13 [Define ("f",Lambda (["x"],(Let (["x",Var "x"],Block [Lambda ([],Block [Var "x"])]))))]
14 (trans @@ compile_string "(define (f x) (lambda () x))")
16 test closure_with_class =
18 Class ("Foo",("","Object"),[],
20 Let (["self",Var "self"],
21 Block [Lambda ([],Block [Var "self"])])])] @@
22 trans @@ compile_string "(define-class Foo (Object) ()) (define-method init ((self Foo)) (lambda () self))"