flatMapIndexedTo

abstract fun <R, C : MutableCollectionWrapper<in R>> flatMapIndexedTo(destination: C, transform: (index: Int, PT) -> Iterable<R>): C

将每个元素转换为一个 Iterable,并将结果添加到目标集合中,并提供元素索引.

参考 kotlin.collections.flatMapIndexedTo

Return

目标集合

Parameters

destination

目标集合

transform

用于将每个元素及其索引转换为 Iterable 的函数