From c9232f39762f7b847c0f043ccc0163ce7b0c0510 Mon Sep 17 00:00:00 2001 From: Dmitry Vibe Date: Sat, 17 Sep 2016 16:29:32 +0300 Subject: [PATCH] fix --- module/curry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/curry.js b/module/curry.js index 562a282..4e14c6d 100644 --- a/module/curry.js +++ b/module/curry.js @@ -21,7 +21,7 @@ export default ({ placeholder }) => { function curry(...initialArgs) { const fn = this; - const len = containsPlaceholder(initialArgs) ? initialArgs.length : fn.length; + const len = containsPlaceholder(initialArgs) ? Math.max(fn.length, initialArgs.length) : fn.length; const _curry = (...args) => { const f = (...newArgs) => {