When working with RxJava, you may find yourself wanting to reuse pieces of an Observable or Flowable chain and somehow consolidate these operators into a new operator. Good developers find opportunities to reuse code, and RxJava provides this ability using ObservableTransformer and FlowableTransformer, which you can pass to the compose() operator.
Composing new operators from existing ones using compose() and transformers
Using ObservableTransformer
The examples of this section require Google Guava as a dependency. If you removed it, then you need to add it back.
In Chapter 3, Basic Operators, we covered the collect() operator and used it to turn Observable<T> into Single<ImmutableList<T>>. Effectively, we...