blob: 1d2266c12bdeb4c969d4d5195a92638c606bdd23 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
function curry(fn) {
const arity = fn.length;
return function $curry(...args) {
if (args.length < arity) {
return $curry.bind(null, ...args);
}
return fn.call(null, ...args);
};
}
|