Re:Show HN: Rhine – A typed Elixir-inspired language on LLVM
by artagnon on Sunday March 20, 2016 @10:47AM
(#11323112)
Yes, I'd implemented the syntax with the intention of doing currying, but haven't gotten around to doing that yet. If you want to do any "partial application", you need to write a lambda, and explicitly pass its function pointer now. The next step is to automatically generate the lambda.
This is standard syntax in functional languages. A->B is a function from A to B. A->B->C is a function from A that returns a function B->C. This is the standard curried function application, like used in OCaml, and it enables you to easily partially apply and compose functions.
addCandidate's type is indeed Int->Int->Int, it's simply not declared that way. In OCaml, the following two syntaxes are equivalent:
I imagine this language is similar.