bosatsu icon indicating copy to clipboard operation
bosatsu copied to clipboard

add type lambdas

Open johnynek opened this issue 2 years ago • 0 comments

we unify type application and curry types left to right, but sometimes we want to name types in a different order.

If we had a direct notion of type lambda, we could change the order for both of those cases.

enum Tree[a, f]: Empty, Branch(item: a, children: f[Tree[a, f]])

# binary tree (has kind +* -> *)
[a] -> Tree[a, [x] -> (x, x)]
# linked list (has kind +* -> *)
[x] -> Tree[x, Option]

first do #936

johnynek avatar Feb 21 '23 21:02 johnynek