Created
December 12, 2018 13:28
-
-
Save quisido/ddf8b18ed93d8bf5f0610f37ce000ff6 to your computer and use it in GitHub Desktop.
Variable length currying in JavaScript
This file contains 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
const x = addSubtract(1)(2)(3); // function | |
+x; // type cast to 0 | |
+x(4); // type cast to 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment