mapEachTo

inline fun <T, R, C : MutableCollection<in R>> Provider<Collection<T>>.mapEachTo(crossinline makeCollection: (size: Int) -> C, crossinline transform: (T) -> R): Provider<C>

Creates and returns a new Provider that maps each element of the Collection obtained from this using the transform function and adds the results to a collection created by makeCollection.

makeCollection and transform should be pure functions.

The returned provider will only be stored in a WeakReference in the parent provider (this).