Created
September 20, 2019 06:07
-
-
Save caasi/e405c2d075956150473ed7067d63bbd8 to your computer and use it in GitHub Desktop.
if err in livescript backcalls
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
success = (f) -> f undefined, 1 | |
failure = (f) -> f new Error('oops') | |
err, value <- success | |
console.error err if err | |
console.log value | |
err, value <- failure | |
console.error err if err |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment