I'm looking for an Rx operator with the following semantics:
Observable<int> inputValues = …;
Observable<bool> gate = …;
inputValues
.combineLatest(gate)
.filter((pair<int, bool> pair) -> { return pair.second; })
.map((pair<int, bool> pair) -> { return pair.first; });
It emits values from the first Observable while the latest value from the second Observable is true. Using combineLatest, we also get a value when the second Observable becomes true. If we don't want that, we could use withLatestFrom in place of combineLatest.
Does this operator exist (in any Rx implementation)?