Skip to content

Instantly share code, notes, and snippets.

@ryanlaws
Created October 2, 2018 13:40
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 ryanlaws/6e7d12ab370f0079357954c9e8a352c1 to your computer and use it in GitHub Desktop.
Save ryanlaws/6e7d12ab370f0079357954c9e8a352c1 to your computer and use it in GitHub Desktop.
Partial function application
const partial = (f) =>
(...args) =>
(args.length >= f.length)
? f(...args)
: partial(f).bind(this, ...args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment