StreamClass.prototype.dedupBy(key: (value: T) => unknown): StreamClass<T, E>
Drops consecutive duplicate values by key — failures are transparent: they pass through without resetting the last-seen memory.
await Stream.from([1, 1, 2, 2, 1]).dedupBy((n) => n).collect(); // [1, 2, 1]
key: (value: T) => unknown
StreamClass<T, E>