Skip to content

Instantly share code, notes, and snippets.

@jameswomack
Created December 2, 2017 13:13
Show Gist options
  • Select an option

  • Save jameswomack/659abb6daa61f75f406e50c79c8ee1f2 to your computer and use it in GitHub Desktop.

Select an option

Save jameswomack/659abb6daa61f75f406e50c79c8ee1f2 to your computer and use it in GitHub Desktop.
Crazy Curry Recipe
p = f => new Proxy(f, Object.create({ store: [], apply(target, thisArg, argumentsList) {
this.store.push(...argumentsList);
return this.store.length < target.length ? p(target.bind(thisArg, ...this.store)) : target(...this.store);
}}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment