Last active
January 23, 2018 00:22
-
-
Save lubien/5c79156ee96c4ce8116243d02b46ab7e 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
| function someHellComputation(initialData, callback) { | |
| fnA(initialData, (err, intermediateData) => { | |
| if (err) return callback(err) | |
| fnB(intermediateData, (err, anotherData) => { | |
| if (err) return callback(err) | |
| fnC(anotherData), (err, finalData) => { | |
| if (err) return callback(err) | |
| callback(null, finalData) | |
| }) | |
| }) | |
| }) | |
| } | |
| someHellComputation(10, (err, data) => { | |
| if (err) return console.error(err) | |
| console.log(data) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment