Is there is an operator which allows me to map over elements of a stream but instead of transforming them, concatenating them?
I have a stream
A => B => C
items$.concatMap(x => f(x))
would lead to
"f(A)" => "f(B)" => "f(C)"
while concat
does not receive an element as param so that won't work either
I want to achieve:
"A" => "B" => "C" => "f(A)" => f(B) => "f(C)"
This will do it but I have to annoyingly break up and store my stream (I guess it's fine for a small example but on a longer pipeline it is more troublesome).
item$ = Observable.of("A","B","C");
item$.concat(item$.map(x => f(x)));