Created
January 8, 2016 12:23
-
-
Save Oikio/2445e3c07f6fb879ef35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var curry = function(fn) { | |
var args = [] | |
return function c() { | |
args = args.concat(Array.prototype.slice.call(arguments)) | |
if (args.length >= fn.length) return fn.apply(this, args) | |
return c | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment