map Indexed To
abstract fun <R, C : MutableCollectionWrapper<in R>> mapIndexedTo(destination: C, transform: (index: Int, T) -> R): C
将给定 transform 函数应用于此数组的每个元素及其索引的结果,并将结果添加到目标集合中。
参考 kotlin.collections.mapIndexedTo
Return
目标集合
Parameters
R
结果元素类型
C
目标集合类型
destination
目标集合
transform
用于将元素及其索引转换为结果元素的函数