Skip to content

Instantly share code, notes, and snippets.

@bonza-labs
Created September 19, 2011 16:56
Show Gist options
  • Save bonza-labs/1226948 to your computer and use it in GitHub Desktop.
Save bonza-labs/1226948 to your computer and use it in GitHub Desktop.
Javascript curry
Function.prototype.curry = function () {
var method = this, args = Array.prototype.slice.call(arguments);
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