Created
December 15, 2011 20:21
-
-
Save smathy/1482682 to your computer and use it in GitHub Desktop.
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
# 2a regular - needs fat arrow to keep access to defined context | |
call_method args, (result) => | |
if result | |
do_something_with result | |
else | |
some_error_with_or_without result | |
# 2b on context switching mode - no access to defined context | |
call_method args, -> | |
if @ | |
@do_something_with | |
else | |
@some_error_with_or_without |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment