DistinctUntilChanged Operator

February 25, 2020 ยท View on GitHub

Overview

Suppress consecutive duplicate items in the original Observable.

Example

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

Options

  • WithBufferedChannel

  • WithContext

  • WithObservationStrategy

  • WithErrorStrategy

  • WithPublishStrategy

Contents

  1. 1Overview
  2. 2Example
  3. 3Options