Returns an OperationFunction that yields elements from the source that are distinct from the previous element.
Type of items in the source.
Optional
Function to compare elements.
An OperationFunction that yields elements from the source that are distinct from the previous element.
const result = distinctUntilChanged<number>()([1, 1, 2, 2, 3, 3]);console.log([...result]); // [1, 2, 3] Copy
const result = distinctUntilChanged<number>()([1, 1, 2, 2, 3, 3]);console.log([...result]); // [1, 2, 3]
Returns an OperationFunction that yields elements from the source that are distinct from the previous element.