Created
December 2, 2017 13:13
-
-
Save jameswomack/659abb6daa61f75f406e50c79c8ee1f2 to your computer and use it in GitHub Desktop.
Crazy Curry Recipe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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