Skip to content

Instantly share code, notes, and snippets.

@quisido
Created December 12, 2018 13:28
Show Gist options
  • Save quisido/ddf8b18ed93d8bf5f0610f37ce000ff6 to your computer and use it in GitHub Desktop.
Save quisido/ddf8b18ed93d8bf5f0610f37ce000ff6 to your computer and use it in GitHub Desktop.
Variable length currying in JavaScript
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