Created
August 15, 2021 19:54
-
-
Save rendall/8060eab6707d9c0849b6849f9e85fa87 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 = (fn, ...initialArgs) => (...args) => fn(...initialArgs, ...args); | |
// const add = (a, b) => a + b; | |
// const add5 = curry(add, 5); | |
// const result = add5(1) // 6 | |
// https://programming-idioms.org/idiom/37/currying |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment