Skip to content

Instantly share code, notes, and snippets.

@danbeam
Created August 16, 2011 23:44
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 danbeam/1150456 to your computer and use it in GitHub Desktop.
Save danbeam/1150456 to your computer and use it in GitHub Desktop.
say hello!
function say() {
var slice = Array.prototype.slice;
var concat = Array.prototype.concat;
var strs = slice.call(arguments);
var func = function() {
strs = concat.call(strs, slice.call(arguments));
return func;
};
func.toString = function() {
return strs.join(' ');
};
return func;
}
say('hello')('world!')('what','up,')('Amit?');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment