3 ms·
Very good catch, thank you. Here is my take on a better version that fixes the issue: const curry = fn => { const curried = (...a) => a.length >= fn.leng
by goldenkey 5y ago
Very good catch, thank you. Here is my take on a better version that fixes the issue:
const curry = fn => {
const curried = (...a) => a.length >= fn.length ? fn(...a) : curried.bind(undefined, ...a)
return curried
}