Skip to content

Instantly share code, notes, and snippets.

@ghostrocket
Created January 29, 2011 15:46
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 ghostrocket/801929 to your computer and use it in GitHub Desktop.
Save ghostrocket/801929 to your computer and use it in GitHub Desktop.
javascript curry
Function.prototype.curry = function curry() {
var fn = this, args = Array.prototype.slice.call(arguments);
return function curryed() {
return fn.apply(this, args.concat(Array.prototype.slice.call(arguments)));
};
};
// pulled from this stackoverflow.com post http://stackoverflow.com/questions/4674021/xhr-get-request-url-in-onreadystatechange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment