Created
January 29, 2011 15:46
-
-
Save ghostrocket/801929 to your computer and use it in GitHub Desktop.
javascript curry
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
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