7 lines
222 B
Kotlin
Vendored
7 lines
222 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with '+= mapIndexed{}'"
|
|
fun foo(list: List<String>, target: MutableList<Int>) {
|
|
<caret>for ((index, s) in list.withIndex()) {
|
|
target.add(s.hashCode() * index)
|
|
}
|
|
} |