Skip to content

Instantly share code, notes, and snippets.

@cdax
Created February 27, 2015 07:01
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 cdax/80f636ff2a37a0e47c73 to your computer and use it in GitHub Desktop.
Save cdax/80f636ff2a37a0e47c73 to your computer and use it in GitHub Desktop.
If Arundhati Roy Wrote JavaScript
// 1) Start with the answer. 2) Move on to the Grubby Details.
// A viable try-able plan.
function sayIt(word) {
return TheSayItSaveItThing(word);
// Does Whatever-it-is-you-need-it-to.
// Loyal, Dependable, Weak-kneed.
function TheSayItSaveItThing(word) {
// When invoked it Saves.
KochuFunction(word);
// When addressed it Says.
TheSayItSaveItThing.toString = function() {
return TheStretchableFetchableThing.join(' ');
}
// Then it waits to be re-summoned.
// Not invoking. Not recursing. Just waiting.
return TheSayItSaveItThing;
}
// Why change KochuFunction when KochuFunction can change itself?
function KochuFunction(word) {
TheStretchableFetchableThing = [word];
KochuFunction = function(word) {
TheStretchableFetchableThing.push(word);
}
// KochuFunction is no longer what it was.
// Or thought it'd be. Ever.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment