Files
kotlin-fork/idea/testData/intentions/loopToCallChain/map/mapTo_inputVarNotUsed.kt.after2
T

9 lines
310 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
fun foo(list: List<String>, target: MutableList<Int>) {
list
.asSequence()
.filter { it.length > 0 }
.forEach { target.add(0) }
}