Created
February 11, 2018 15:57
-
-
Save davidbarral/99405be529a55c81853440af842b5d78 to your computer and use it in GitHub Desktop.
Curry: partial application
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 = fn => (...args) => | |
args.length >= fn.length | |
? fn(...args) | |
: (...innerArgs) => fn(...args, ...innerArgs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment