Created
August 23, 2017 01:05
-
-
Save benlesh/dee2495071e8cf08156ee206ff8316b9 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
Observable.defer(async function() { | |
const a = await promiseDelay(1000).then(() => 1); | |
const b = a + await promiseDelay(1000).then(() => 2); | |
return a + b + await promiseDelay(1000).then(() => 3); | |
}) | |
.subscribe(x => console.log(x)) // logs 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment