kmongo / kotlin.collections / com.mongodb.client.MongoIterable / subtract

subtract

infix fun <T> MongoIterable<T>.subtract(other: Iterable<T>): Set<T> (source)

Returns a set containing all elements that are contained by this collection and not contained by the specified collection.

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