Created
August 29, 2014 18:15
-
-
Save joepie91/a367bd83e19df738d63c to your computer and use it in GitHub Desktop.
Promises in CoffeeScript
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
someAsyncMethod() | |
.then (result) -> | |
DoSomethingSynchronous() | |
return someOtherAsyncMethod("stuff") | |
.then (result) -> | |
return yetAnotherAsyncMethod("things", "and stuff") | |
.then (result) -> | |
console.log "Whoo, we're done!" | |
exit 0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment