Closed leissa closed 1 year ago
This adds .fun decls, .fn exprs, and .Fn types.
.fun
.fn
.Fn
You can now write decls like this:
.fun f (T: *)(a: T, b: T) -> T = return a;
which means the same as
.con f (T: *)((a: T, b: T), return: .Cn T) = return a;
There is an according expr available:
.let f = .fn (T: *)(a: T, b: T) -> T = return a;
And a type:
.let F = .Fn [T: *][T, T] -> T;
Continuation types can now also be curried:
.let K = .Cn [T: *][T, T];
Finally, you can invoke returning continuations with the ret expression:
.let res = f .Nat $ (23, 42); use(res)
Includes already #206.
This adds
.fun
decls,.fn
exprs, and.Fn
types.You can now write decls like this:
which means the same as
There is an according expr available:
And a type:
Continuation types can now also be curried:
Finally, you can invoke returning continuations with the ret expression:
Includes already #206.