toMutableSet

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

Returns a mutable set containing all distinct elements from the given collection.

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