Created
July 27, 2012 00:31
-
-
Save terraflubb/3185416 to your computer and use it in GitHub Desktop.
avoidwork's coffee quiz
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
# I'm not sure what you mean @avoidwork ... | |
# | |
# "how do you make a lambda pass this and call it global? do (global) -> :/ | |
# | |
# If you mean "pass this" as in hang onto the context from which the | |
# function was declared, then I think you want to use the fat arrow => | |
@banana = "tasty" | |
global = => | |
console.log "Bananas are #{@banana}" | |
# Paste that into http://coffeescript.org/ to get the translation. |
do (global = this) ->
true
thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
more along the lines of this...