toMutableSet

fun <T> Sequence<T>.toMutableSet(): MutableSet<T>

Returns a new MutableSet containing all distinct elements from the given sequence.

The returned set preserves the element iteration order of the original sequence.

The operation is terminal.