Files
kotlin-fork/idea/testData/intentions/loopToCallChain/forEachIndexed.kt.after
T
2016-08-16 17:38:17 +03:00

8 lines
302 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}.forEachIndexed{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.forEachIndexed{}'"
fun foo(list: List<String>) {
list
.map { it.substring(1) }
.forEachIndexed { index, s1 -> println(s1.hashCode() * index) }
}