4 ms·
Defaulting to data-last gets you 80% of the way. fn = (a -> b) -> a So your typical array mapping becomes list.map(to(v => v * 2)) All very contrive
by gherkinnn 4y ago
Defaulting to data-last gets you 80% of the way.
fn = (a -> b) -> a
So your typical array mapping becomes
list.map(to(v => v * 2))
All very contrived of course.
Ramda’s currying [0] gives you the _ param to play with the order. But I’ve come to the conclusion that currying in JS is rarely worth the effort. [1]
0 - https://github.com/ramda/ramda/blob/v0.28.0/source/__.js https://github.com/ramda/ramda/blob/v0.28.0/source/__.js
1 - https://2ality.com/2017/11/currying-in-js.html https://2ality.com/2017/11/currying-in-js.html