Files
kotlin-fork/idea/testData/intentions/loopToCallChain/forEach/indexed.kt.after
T
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00

8 lines
294 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) }
}