-
-
Save ryansroberts/2225893 to your computer and use it in GitHub Desktop.
Panda: I MADE IT BETTER
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
panda = (-> | |
bambooLevel = 0 | |
isAsleep = false | |
wakeUp = -> isAsleep = false | |
eatBamboo: -> ++bambooLevel | |
goToSleep: -> | |
isAsleep = true | |
setTimeout wakeUp,1000 | |
)() | |
panda.eatBamboo() | |
panda.goToSleep() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
better? let's ask Douglas...