Skip to content

Instantly share code, notes, and snippets.

@darklight721
Created August 29, 2015 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darklight721/7544d835a00d11f545b6 to your computer and use it in GitHub Desktop.
Save darklight721/7544d835a00d11f545b6 to your computer and use it in GitHub Desktop.
function add(...n) {
let t = n.reduce((a, b) => a + b);
let a = add.bind(0, t);
a.valueOf = () => t;
return a;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment