Skip to content

Instantly share code, notes, and snippets.

@Zemnmez
Last active February 20, 2019 16:50
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 Zemnmez/ccf8afc5495f640210bbd00110f432ee to your computer and use it in GitHub Desktop.
Save Zemnmez/ccf8afc5495f640210bbd00110f432ee to your computer and use it in GitHub Desktop.
variadic curry, javascript
z=f=>(...a)=>+a!=0?z(f.bind(0,...a)):f()
const curry = (f) =>
(...args) => args.length? curry(f.bind(0, ...args)): f();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment