flatMapTo<R, C extends KtMutableCollection<R> > method
Appends all elements yielded from results of transform
function being invoked on each element of original collection, to the given destination
.
Implementation
C flatMapTo<R, C extends KtMutableCollection<R>>(
C destination, KtIterable<R> Function(T) transform) {
for (final element in iter) {
final list = transform(element);
destination.addAll(list);
}
return destination;
}