2 ms·
I don't think currying can reasonably be combined with optional parameters. At least I've never seen a useful way to do so. In a previous article (http://fr.u
by CrossEye 12y ago
I don't think currying can reasonably be combined with optional parameters. At least I've never seen a useful way to do so.
In a previous article (http://fr.umio.us/why-ramda/ http://fr.umio.us/why-ramda/) I discuss more thoroughly how I would tend to use this currying, namely to build up collections of useful functions, often in points-free style, so that major parts of the application would end up as (ideally well-named) functions, each which serve as pipelines of these smaller functions, passing data through the system.
I do find this significantly more readable, but _de gustibus non est disputandum_.
- polm23 12y agoI've never used that particular feature, but Livescript lets you use default arguments on curried functions by calling with no arguments. http://livescript.net/#functions http://livescript.net/#functions
- tel 12y agoWhich implies there's a distinction between "siphoning arguments around" and "application". That feels very weird.