Say I have two properties, a
and b
. If I want a stream that combines their values, I can use a.combine(b, <fn>)
. Abstractly, this gets me the following:
a: 0 1 2
b: 0 1 2 3
a,b: 0,0 1,0 1,1 1,2 2,2 2,3
But what I need is a stream that only updates when a
updates, but uses the most up-to-date value of b
. That is:
a: 0 1 2
b: 0 1 2 3
a,b: 0,0 1,0 2,2
Furthermore, successive values of a
may be equal, and I don't want to skip duplicates, so I want:
a: 0 1 1
b: 0 1 2 3
a,b: 0,0 1,0 1,2
How would I build this?
@raimohanska Perfect, thank you.