inline fun <T, R, C : MutableCollection<in R>> MongoIterable<T>.mapTo(destination: C, crossinline transform: (T) -> R): C
(source)
Applies the given transform function to each element of the original collection and appends the results to the given destination.