Files
kotlin-fork/idea/testData/intentions/loopToCallChain/map/mapIndexedTo.kt
T
2016-08-23 22:47:42 +03:00

8 lines
249 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapIndexedTo(){}'"
// IS_APPLICABLE_2: false
fun foo(list: List<String>, target: MutableList<Int>) {
<caret>for ((index, s) in list.withIndex()) {
target.add(s.hashCode() * index)
}
}