Skip to content

Instantly share code, notes, and snippets.

@bnoden
Created March 14, 2018 23:52
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 bnoden/d2c7b71a32319877f9f007cbd1df6f5d to your computer and use it in GitHub Desktop.
Save bnoden/d2c7b71a32319877f9f007cbd1df6f5d to your computer and use it in GitHub Desktop.
const curry = (func, arr = []) => (...args) =>
(nextArgs =>
nextArgs.length === func.length
? func(...nextArgs)
: curry(func, nextArgs))([...arr, ...args]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment