Files
kotlin-fork/idea/testData/intentions/loopToCallChain/count/long.kt.after2
T

11 lines
321 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
fun foo(list: List<String>): Long {
var count = 0L
list
.asSequence()
.filter { it.length > 10 }
.forEach { count++ }
return count
}