Created
January 20, 2017 01:28
-
-
Save adambene/bb2f1c55b19387be6dde7d62c2c541de to your computer and use it in GitHub Desktop.
Currying in JavaScript ES6 - properties
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
add = (a, b) => a + b | |
curriedAdd = a => b => a + b | |
add(5,6) === 11 | |
curriedAdd(5)(6) === 11 | |
uncurry(curry(add))(5,6) === 11 | |
curry(uncurry(curriedAdd))(5)(6) === 11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment