diff options
Diffstat (limited to 'js/b.js')
-rw-r--r-- | js/b.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/b.js b/js/b.js index 18c28d7..ec44ab7 100644 --- a/js/b.js +++ b/js/b.js @@ -26,10 +26,10 @@ const b = { pipe: (...args) => args.reduce((acc, el) => el(acc)), - compose: (...fns) => (...args) => fns.reduceRight((res, fn) => [fn.call(null, ...res)], args)[0], - identity: x => x, - curry: (fn) => { - let curried = (...args) => { + compose: (...fns) => (...args) => fns.reduceRight((res, fn) => [fn.call(null, ...res)], args)[0], + identity: x => x, + curry: (fn) => { + const curried = (...args) => { if (args.length >= fn.length) return fn(...args) else @@ -69,4 +69,4 @@ const b = { // const noVowels = b.replace(/[aeiou]/ig); // const censored = noVowels('*'); // const r4 = censored('Chocolate Rain'); -// console.log('curry ', r1, r2, r3, r4); \ No newline at end of file +// console.log('curry ', r1, r2, r3, r4); |