mapTo<R, C extends KtMutableCollection<R> > method
C
mapTo<R, C extends KtMutableCollection<R> >(
- C destination,
- R transform(
- T
Applies the given transform
function to each element of the original collection
and appends the results to the given destination
.
Implementation
C mapTo<R, C extends KtMutableCollection<R>>(
C destination, R Function(T) transform) {
for (final item in iter) {
destination.add(transform(item));
}
return destination;
}