4 ms·
Yes, freely admitted. (Author here.) I feel that although the distinction can be very important, it's much less so for Javascript. And the implementation in
by CrossEye 12y ago
Yes, freely admitted. (Author here.)
I feel that although the distinction can be very important, it's much less so for Javascript. And the implementation in Ramda can be used that way any time you choose:
var total = reduce(add)(0); // or
var sum = reduce(add)(0)(numbers)
works just as well in Ramda as
var total = reduce(add, 0); // or
var sum = reduce(add, 0, numbers)
So, as I said, feel free to keep on insisting. :-)
- cowbell 12y agohttp://vimeo.com/96639840 http://vimeo.com/96639840 Start at 26mins. You don't have flip. You lose control over partial application. It isn't curry. You're right. It is an important distinction :)
- comex 12y agoThis implementation of multi-argument partial application does not in any say prevent implementation of flip. It's just syntax sugar.
- CrossEye 12y agoI finally got a chance to watch that video, and it looks as though what you're worried about is `flip`. Ramda for one already includes a version that works much like Haskell's. I don't know if this satisfies your objection, though.
- tel 12y agoAs I stated above... flip is well defined so long as your arguments are positional.