Created
October 1, 2018 15:25
-
-
Save manekinekko/55c94cf2034916bb799de64a286b11a7 to your computer and use it in GitHub Desktop.
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
function curry() { | |
const [fn, ...restArgs] = Array.from(arguments); | |
return function() { | |
const args = Array.from(arguments); | |
return fn.apply(null, args.concat(restArgs)); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment