Skip to content

Instantly share code, notes, and snippets.

@davidbarral
Created February 11, 2018 16:13
Show Gist options
  • Save davidbarral/0b8dee173113faaaada1c0824fc6c5a3 to your computer and use it in GitHub Desktop.
Save davidbarral/0b8dee173113faaaada1c0824fc6c5a3 to your computer and use it in GitHub Desktop.
Curry: not working version
const curry = fn => (...args) =>
args.length >= fn.length
? fn(...args)
: curry((...innerArgs) => fn(...args, ...innerArgs));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment