[ES6] Functional Programming: cheatsheet
Peter Chang
741

Just a precision, the spread operator is working for arrays only in es6.
The object version is still in proposition (stage 3 currently). But anyway
it’s a great tool :) Nice article !

Plus, look at this great currying “trick”:

const fancyCurry = a => b => c => a + b + c;
const total = fancyCurry(1)(2)(3);
// total === 6

In plain old JS

const oldCurry = function (a) {
return function (b) {
return function (c) {
return a + b + c;
}
}
}
const total = oldCurry(1)(2)(3);
// total === 6