Stream.uniq
You're seeing just the function
uniq
, go back to Stream module for more information.
Specs
uniq(Enumerable.t()) :: Enumerable.t()
Creates a stream that only emits elements if they are unique.
Keep in mind that, in order to know if an element is unique or not, this function needs to store all unique values emitted by the stream. Therefore, if the stream is infinite, the number of elements stored will grow infinitely, never being garbage-collected.
Examples
iex> Stream.uniq([1, 2, 3, 3, 2, 1]) |> Enum.to_list()
[1, 2, 3]