Skip to content

Instantly share code, notes, and snippets.

@kalisjoshua
Created April 7, 2017 00:17
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 kalisjoshua/d2b36346c158b64f5fcd6051f0e3afc9 to your computer and use it in GitHub Desktop.
Save kalisjoshua/d2b36346c158b64f5fcd6051f0e3afc9 to your computer and use it in GitHub Desktop.
Simple - recursive - ES6/2015 curry function.
const curry = (fn, ...args) => args.length < fn.length
? (...add) => curry(fn, ...args.concat(add))
: fn(...args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment