Suppress duplicate items emitted by an Observable.
observable := rxgo.Just(1, 2, 2, 3, 4, 4, 5)().
Distinct(func(_ context.Context, i interface{}) (interface{}, error) {
return i, nil
})
Output:
1
2
3
4
5
Suppress duplicate items emitted by an Observable.
observable := rxgo.Just(1, 2, 2, 3, 4, 4, 5)().
Distinct(func(_ context.Context, i interface{}) (interface{}, error) {
return i, nil
})
Output:
1
2
3
4
5