Created
January 12, 2013 01:38
-
-
Save rjz/4515579 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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