Skip to content

Instantly share code, notes, and snippets.

@SirPepe
Created July 14, 2011 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SirPepe/1083493 to your computer and use it in GitHub Desktop.
Save SirPepe/1083493 to your computer and use it in GitHub Desktop.
JavaScript Curry
Function.prototype.curry = function(){
if(arguments.length < 1) return this;
var args = Array.prototype.slice.call(arguments),
method = this;
return function(){
return method.apply(this, args.concat(Array.prototype.slice.call(arguments)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment