Skip to content

Instantly share code, notes, and snippets.

@adambene
Last active May 24, 2017 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save adambene/10ecd1a5f1175d18c506f2135e7dd91d to your computer and use it in GitHub Desktop.
Save adambene/10ecd1a5f1175d18c506f2135e7dd91d to your computer and use it in GitHub Desktop.
Currying in JavaScript ES6 - uncurry
curryedMultiply = (n) => (m) => n * m
curryedMultiply(3)(4) === 12 // true
multiply = (n, m) => curryedMultiply(n)(m)
multiply(3, 4) === 12 // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment