Skip to content

Instantly share code, notes, and snippets.

@PeterNMcArthur
Last active May 24, 2018 14:12
Show Gist options
  • Save PeterNMcArthur/5cacefa34e3e3d4dad2f514f2eed003b to your computer and use it in GitHub Desktop.
Save PeterNMcArthur/5cacefa34e3e3d4dad2f514f2eed003b to your computer and use it in GitHub Desktop.
A function that curries anything you pass in to it
const curry = fn => (...args) => args.length >= fn.length ? fn(...args) : (...nxtArgs) => curry(fn)(...args, ...nxtArgs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment