phadej / typify

Runtime type checking for JavaScript
BSD 3-Clause "New" or "Revised" License
76 stars 7 forks source link

Curried functions #38

Open danielo515 opened 6 years ago

danielo515 commented 6 years ago

Hello, I didn't find any reference on the readme,so this is why I'm asking. Does this library support curried functions? If so, what are the limitations? Regards

phadej commented 6 years ago

the auto-curried ones? I.e. may take 1,2,3... arguments and return either the final value or another function?

No, that's no supported, and probably won't be.

danielo515 commented 6 years ago

No, I don't mean auto-curried (if you mean magic-partial-application a-la ramda). I mean actually curried functions, functions that only take a function and return another function

sum = a => b => a + b

Those ones, where you always know what the next return type will be. Funnily the function signature and the function definition will match 1:1