flatMapIndexedTo

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

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

Sources

Katlib source
Link copied to clipboard