flatMapIndexedTo

inline fun <T, R, C : MutableCollection<in R>> Iterable<T>.flatMapIndexedTo(destination: C, transform: (index: Int, T) -> Iterable<R>?): C(source)

Appends all elements yielded from results of transform function being invoked on each element of original collection, to the given destination.