Hello, I'm looking for a combination of `debounce(...
# flow
m
Hello, I'm looking for a combination of
debounce()
and
distinctUntilChanged()
. I want to debounce elements if they are the same. So
A B B C D
in quick succession will become
A B C D
. I can't just use
distinctUntilChanged()
, because I want to allow sending the same element twice, as long as it's not in quick succession. How would I achieve that?
f
you seem to describe just
debounce
, "I want to allow sending the same element twice as long as it's not in quick succession" is just plain
debounce
. If you need to customize it, you can always look at the implementation of
debounce
and make your own variant based on it