Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> In Haskell, constructors are first order so they can be passed as functions, and partially applied. It makes sense that their declaration and use looks like function declaration and function calls. In OCaml they are not first class, that is, you can't pass the as arguments, or partially apply them.

But I guess in Reason they could be first class. All it takes is to interpret an occurrence of an n-ary constructor

  Foo
as

  (fun a1 ... an => Foo a1 ... an)


Yes, that is do-able, if they want to make this change.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: