Skip to content

Instantly share code, notes, and snippets.

@davidbarral
Created February 11, 2018 15:57
Show Gist options
  • Save davidbarral/99405be529a55c81853440af842b5d78 to your computer and use it in GitHub Desktop.
Save davidbarral/99405be529a55c81853440af842b5d78 to your computer and use it in GitHub Desktop.
Curry: partial application
const curry = fn => (...args) =>
args.length >= fn.length
? fn(...args)
: (...innerArgs) => fn(...args, ...innerArgs);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment