Let's say I have two observables of sorted doubles. I'd like to get the difference between them as an observable. For instance:
1 2 4
left: ──o───────o───────────o────/
1 3 4 5
right: ──o────o──o───o───/
l2 r3 r5
output: ──────────o───────────o────o─/
The imperative implementation for this is simple: Keep a list of the items on the side that you've still not reached and "emit" the items from the other side.
What is the canonical approach to this in the world of RFP? I'm specifically using RxScala.
This is how I would do it in rxjava implied that two observables have the same length.
EDIT
Another approach would be to use a collection