Closed
Description
This method will make sure the stream only contains distinct elements.
For ordered streams, the selection of distinct elements is stable
(for duplicated elements, the element appearing first in the encounter
order is preserved.) For unordered streams, no stability guarantees
are made.
This method should not mutate the stream instance but rather return a new instance with a new modified array.