Created
February 7, 2012 20:46
-
-
Save kriskowal/1761838 to your computer and use it in GitHub Desktop.
Sometimes literally https://twitter.com/#!/jashkenas/status/166969306859581440
This file contains 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
/* | |
Error | |
at treachery (hell.js:49:11) | |
at fraud (hell.js:45:12) | |
at violence (hell.js:41:12) | |
at heresy (hell.js:37:12) | |
at anger (hell.js:33:12) | |
at greed (hell.js:29:12) | |
at gluttony (hell.js:25:12) | |
at lust (hell.js:21:12) | |
at limbo (hell.js:17:12) | |
*/ | |
limbo() | |
function limbo() { | |
return lust(); | |
} | |
function lust() { | |
return gluttony(); | |
} | |
function gluttony() { | |
return greed(); | |
} | |
function greed() { | |
return anger(); | |
} | |
function anger() { | |
return heresy(); | |
} | |
function heresy() { | |
return violence(); | |
} | |
function violence() { | |
return fraud(); | |
} | |
function fraud() { | |
return treachery(); | |
} | |
function treachery() { | |
throw new Error; | |
} |
Clearly, this works better as a Class:
class FavoriteThings
limbo: -> @lust()
lust: -> @gluttony()
gluttony: -> @greed()
greed: -> @anger()
anger: -> @heresy()
heresy: -> @violence()
violence: -> @fraud()
fraud: -> @treachery()
treachery: -> throw new Error
new FavoriteThings().limbo()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no chance to repro this with coffee