These are chat archives for ReactiveX/RxJava
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
Hi everyone. How does one convert an Observable of one type to another type:
Observable<T> to Observable<R>
Are we supposed to use the
to operator or perhaps
When I try using flatmap it complains about observable cannot be applied to anonymous function<Observable<T>, Observable<R>>
T -> Rdoesn't this do what you want?
(T -> R) -> R
(T -> Observable<R>) -> R(I hope I wrote that right)
Hi, I believe the issue was due to my misunderstanding of flatmap. I thought it was going to pass in
(Observable<T> -> Observable<R>)
But as @dmstocking mentioned it should be:
(T -> Observable<R>)
Changing that fixed things for me.