Skip to content

Instantly share code, notes, and snippets.

@joshblack
Created October 5, 2014 17:08
Show Gist options
  • Save joshblack/6dedaf663a0c91f1fe8a to your computer and use it in GitHub Desktop.
Save joshblack/6dedaf663a0c91f1fe8a to your computer and use it in GitHub Desktop.
// Composition
function add(x) {
return function(y) {
return x + y;
};
};
// Usage
add(1)(2); // 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment