You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example results in the entire alphabet being printed without errors, even though the initial range exceeds that of the alphabet.
295
306
@@ -307,7 +318,7 @@ Observable.just(100, 150)
307
318
308
319
We started with the values 100 and 150, which we used as the interval period for the asynchronous observables created in `flatMap`. Since `interval` emits the numbers 1,2,3... in both cases, to better distinguish the two observables, we replaced those values with interval time that each observable operates on.
As expected, the 3 iterables that we created are flattened in a single observable sequence.
386
397
387
-
As an Rx developer, you are advised to present your data as observable sequences and avoid mixing observables with iterables. However, when your data is already in the format of a collection, e.g. because standard Java operations returned them like that, it can be simpler or faster to just use them as they are without converting them first. `flatMapIterable` also eliminates the need to make a choice about interleaving or not: `flatMapIterable` doesn't interleave, just like you would expect from a synchronous flatMap.
398
+
As an Rx developer, you are advised to present your data as observable sequences and avoid mixing observables with iterables. However, when your data is already in the format of a collection, e.g. because standard Java operations returned them like that, it can be simpler or faster to just use them as they are without converting them first. `flatMapIterable` also eliminates the need to make a choice about interleaving or not: `flatMapIterable` doesn't interleave, just like you would expect from a synchronous `flatMap`.
388
399
389
400
There is a second overload to `flatMapIterable` that allows you to combine every value in the iterable with the value that produced the iterable.
0 commit comments