Is it possible to create an observable that combines two subjects in a unique way, different from the zip function?
The goal is to combine two subjects so that when both have emitted values, the latest of their values is emitted. Then, after both emit at least once more, the latest values are emitted again, and so on.
Visual representation:
1 ---------- 2 ----- 3 -- 4 ------------------- 5 ——
------- a ------------------- b --- c — d —-————
Desired output:
------- 1a ----------------- 4b ---————-5d —-
For example, if subject1 emits 5 times and then subject2 emits once, the first emitted value would be a pair of both subjects' initial emissions: (subj1-emit5, subj2-emit1).