pointless-js
Version:
Functional point-free utilities for js
13 lines • 364 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function curry(fn) {
const arity = fn.length;
return function curried(...args) {
if (args.length < arity) {
return curried.bind(null, ...args);
}
return fn(...args);
};
}
exports.curry = curry;
//# sourceMappingURL=curry.js.map