concatmap

What is the difference between concatMap and flatMap in RxJava

北城以北 提交于 2019-11-27 19:37:25
It seems that these 2 functions are pretty similar. They have same signature (accepting rx.functions.Func1<? super T, ? extends Observable<? extends R>> func ), and their marble diagrams look exactly same. Can't paste the pics here, but here's one for concatMap , and here's one for flatMap . There seems to be some subtle difference in the description of resulting Observable , where one produced by concatMap contains items that result from concatinating resulting Observables, and the one produced by flatMap contains items that result from first merging the resulting Observables, and emitting

What is the difference between concatMap and flatMap in RxJava

允我心安 提交于 2019-11-26 19:49:11
问题 It seems that these 2 functions are pretty similar. They have same signature (accepting rx.functions.Func1<? super T, ? extends Observable<? extends R>> func ), and their marble diagrams look exactly same. Can't paste the pics here, but here's one for concatMap, and here's one for flatMap. There seems to be some subtle difference in the description of resulting Observable , where one produced by concatMap contains items that result from concatinating resulting Observables, and the one