Re:Currying vs. Partial Application (2015)
by tommikaikkonen on Tuesday September 19, 2017 @02:25AM
(#15282232)
I agree, that doesn't look bad. However, this type definition forces you to supply one argument per function call, which looks awful in JavaScript:
That's a big drawback for me. Libraries like Ramda allow one or more arguments per function call:
That's what makes the verbosity unbearable, as each type of call needs its own type.
[ Parent
| on HN ]
Re:Currying vs. Partial Application (2015)
by noppa on Tuesday September 19, 2017 @05:59AM
(#15283157)
At least in Flow it's actually possible to properly type curried functions!
Here's a gist of the type definitions I'm using: https://gist.github.com/noppa/c600cc43fd44e33768efe6c6eec4a9...
I think something similar might work in TS too.
Demo: https://goo.gl/w3aPsw