Created
March 14, 2018 23:52
-
-
Save bnoden/d2c7b71a32319877f9f007cbd1df6f5d to your computer and use it in GitHub Desktop.
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
const curry = (func, arr = []) => (...args) => | |
(nextArgs => | |
nextArgs.length === func.length | |
? func(...nextArgs) | |
: curry(func, nextArgs))([...arr, ...args]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment