Skip to content

Instantly share code, notes, and snippets.

@adambene
Created January 20, 2017 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adambene/bb2f1c55b19387be6dde7d62c2c541de to your computer and use it in GitHub Desktop.
Save adambene/bb2f1c55b19387be6dde7d62c2c541de to your computer and use it in GitHub Desktop.
Currying in JavaScript ES6 - properties
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