For each item from this observable, filter out consequentially repeated values and emit only changes from the new observable that is returned.
More...
For each item from this observable, filter out consequentially repeated values and emit only changes from the new observable that is returned.
- Template Parameters
-
BinaryPredicate | (optional) the type of the value comparing function. The signature should be equivalent to the following: bool pred(const T1& a, const T2& b); |
- Parameters
-
pred | (optional) the function that implements comparison of two values. |
- Returns
- Observable that emits those items from the source observable that are distinct from their immediate predecessors.
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnNext: 5
OnCompleted