Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
rimo
· 13y ago · 0 comments
The approach is interesting but the syntax makes it hard to use. Why not make the first arguments the types like one would expect?
Comments
[–]
mneary
13y ago
I went back and forth with that. I think I went with postfix because there exists another syntax which looks prefix:
T([Number, Number])(function(x) { return x; })
For this method, a function type is defined and then serves as a constructor that accepts a function as argument.