Files
kotlin-fork/idea/testData/intentions/loopToCallChain/forEach/KT14341.kt.after2
T

9 lines
286 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
fun foo(list: List<Int>){
list
.asSequence()
.filter { it > 0 }
.forEach { println("positive number") }
}