Last active
August 26, 2024 11:50
-
-
Save ax2mx/76056658f84de647d5387999c148137c to your computer and use it in GitHub Desktop.
The most concise currying function in JavaScript so far
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
| const curryPartial = (fn, ...args) => | |
| args.length >= fn.length | |
| ? fn(...args) | |
| : (...rest) => curryPartial(fn, ...args, ...rest); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment