nub package:streamly-core

Used as a scan. Returns Just for the first occurrence of an element, returns Nothing for any other occurrences. Example:
>>> stream = Stream.fromList [1::Int,1,2,3,4,4,5,1,5,7]

>>> Stream.fold Fold.toList $ Stream.scanMaybe Fold.nub stream
[1,2,3,4,5,7]
Pre-release
The memory used is proportional to the number of unique elements in the stream. If we want to limit the memory we can just use "take" to limit the uniq elements in the stream.
Like nub but specialized to a stream of Int, for better performance. Pre-release