Created
July 31, 2014 04:07
-
-
Save geraldyeo/d969f01b5f538b0e33fc to your computer and use it in GitHub Desktop.
Currying utility function
This file contains hidden or 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
| var currier = function(func){ | |
| var args = Array.prototype.slice.call(arguments, 1); | |
| return function(){ | |
| return func.apply(this, args.concat(Array.prototype.slice.call(arguments, 0))); | |
| }; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment