funcom
Version:
Functional composition helpers
12 lines (11 loc) • 317 B
JavaScript
export function compose() {
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
fns[_key] = arguments[_key];
}
return function (initial) {
return fns.reduceRight(function (arg, fn) {
return fn(arg);
}, initial);
};
}
//# sourceMappingURL=compose.js.map