Open
Description
This repository looks like it's no longer maintained, but I thought I might throw my question out in case anyone in the void is listening.
Is there a specific reason for including the number of arguments the curried function expects as a parameter?
Would a PR to index.es6.js with the following be appreciated?
let _curry = (fn, curryArgs = []) => {
return (...args) => {
var concatArgs = [...concatArgs, ...args];
// If function arity greater than number of received args
if (fn.length > concatArgs.length) {
return _curry(fn, concatArgs);
} else {
return fn(...concatArgs);
}
};
};
Metadata
Metadata
Assignees
Labels
No labels