Created
September 12, 2016 15:44
-
-
Save fgandellini/b0460b883860b14ffd065c919ce8ee64 to your computer and use it in GitHub Desktop.
streams everywhere!
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
const Rx = require('rxjs/Rx') | |
const getB = (a, cb) => setTimeout(a => cb(null, a+'b'), 10000) | |
const getbAsObservable = Rx.Observable.bindNodeCallback(getB) | |
const a$ = Rx.Observable.from([1, 2, 3]) | |
const b$ = a$.map(a => getbAsObservable(a)) | |
const c$ = a$.zip(b$.mergeAll()) | |
c$.subscribe(data => console.log(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
current output:
desired output: