Is there a similar operator to `reduce()`, which r...
# rx
r
Is there a similar operator to
reduce()
, which returns multiple events if they’re treated as equal? Imagine the sequence
[3, 4, 1, 5, 1, 3]
and I want get all minimum values, then
[1, 1]
should be emitted. Basically it should be similar to an
Comparator
, negative value “skip arg1”, zero keep both, positive value “skip arg2”. Right now I’m using a combination of
.sorted().filter()
. That works, but items could be skipped earlier if a better item was already found