Suppress consecutive duplicate items in the original Observable.
observable := rxgo.Just(1, 2, 2, 1, 1, 3)().
DistinctUntilChanged(func(_ context.Context, i interface{}) (interface{}, error) {
return i, nil
})
Output:
1
2
1
3
Suppress consecutive duplicate items in the original Observable.
observable := rxgo.Just(1, 2, 2, 1, 1, 3)().
DistinctUntilChanged(func(_ context.Context, i interface{}) (interface{}, error) {
return i, nil
})
Output:
1
2
1
3