Skip to content

Instantly share code, notes, and snippets.

@rjz
Created January 12, 2013 01:38
Show Gist options
  • Select an option

  • Save rjz/4515579 to your computer and use it in GitHub Desktop.

Select an option

Save rjz/4515579 to your computer and use it in GitHub Desktop.
// say('hello')('world') & say('hello')('again')
function say (what) {
var words = this instanceof Array ? this : [],
bound = function (what) { return say.call(words, what); }
words.push(what);
bound.toString = function () { console.log(words.join(' ')) };
return bound;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment