diff options
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/utils.js b/lib/utils.js index cc68ba8c..ac6f32c3 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -169,7 +169,8 @@ Function.prototype.proxy = function(self) { * This creates a new function out of an existing function, where the new function takes fewer arguments. * This allows us to pass around functions instead of functions + a partial list of arguments. */ -Function.prototype.curry = function(fixedArguments) { +Function.prototype.curry = function() { + var fixedArguments = Array.copy(arguments); var fn = this; return function() { return fn.apply(this, fixedArguments.concat(Array.copy(arguments))); }; }; |
