Created
February 24, 2020 01:05
-
-
Save IgorHalfeld/c432950447684ae2382aab6cf1e8e90b 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
export const curry = fn => (...args) => { | |
if (args.length >= fn.length) { | |
fn.apply(null, args) | |
return | |
} | |
curry(fn.bind(null, ...args)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment