Type of elements within the source iterable.
The source iterable.
Optionalcomparator: EqualityComparator<TElement, TElement>Optional equality comparator used to determine whether adjacent elements are equal. Defaults to the library's standard equality comparison.
A sequence that yields the first element of each run of equal values.
Unlike distinct, this only filters adjacent duplicates and preserves earlier occurrences of repeated values.
Removes consecutive duplicate elements by comparing each element with its predecessor.