Re:Functional Programming in 5 Minutes
by andolanra on Sunday May 19, 2013 @08:04PM
(#5735029)
It's not a matter of should so much as can. In some languages (e.g. Haskell), functions are curried-by-default; in others (e.g. Lisps), functions are uncurried-by-default. In each of these, I could (if I wanted) write either version, e.g.
Haskell chooses to make curried the default, but allows you to write uncurried functions if you'd like. Lisp chooses the opposite.
[ Parent
| on HN ]
Also, just generally, currying is a transformation. You can do it by hand, but it can also be done mechanically, either automatically by the language in certain situations, or by applying (easy to define and usually included anyway) curry and uncurry functions where appropriate.
Re:Functional Programming in 5 Minutes
by mcintyre1994 on Monday May 20, 2013 @06:23AM
(#5736842)
Ah okay I see, thanks!