Skip to content

Instantly share code, notes, and snippets.

@Oikio
Created January 8, 2016 12:23
Show Gist options
  • Save Oikio/2445e3c07f6fb879ef35 to your computer and use it in GitHub Desktop.
Save Oikio/2445e3c07f6fb879ef35 to your computer and use it in GitHub Desktop.
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