Returns a Stream that yields elements from the source that are distinct from the previous element.
Type of items in the source.
Optional
Function to compare elements.
Operation 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 a Stream that yields elements from the source that are distinct from the previous element.