Skip to content

Instantly share code, notes, and snippets.

@why-jay
Created December 27, 2014 17:06
Show Gist options
  • Save why-jay/0c0d3ca9cb1ee9f85299 to your computer and use it in GitHub Desktop.
Save why-jay/0c0d3ca9cb1ee9f85299 to your computer and use it in GitHub Desktop.
function addX(x) {
return y => x + y;
}
let add42 = addX(42);
let i = add42(8);
assert(i === 50);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment