Skip to content

Instantly share code, notes, and snippets.

@anagorsky
Last active September 15, 2015 21:04
Show Gist options
  • Save anagorsky/fa629b82bd94e04c0d66 to your computer and use it in GitHub Desktop.
Save anagorsky/fa629b82bd94e04c0d66 to your computer and use it in GitHub Desktop.
var multi = function(a){
var tmp = function(b){
a*=b;
tmp.valueOf = function(){return a};
return tmp;
}
return tmp;
};
console.log(multi(2)(2)(2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment