Files
kotlin-fork/idea/testData/intentions/loopToCallChain/flatMap/continue.kt
T
2016-08-23 22:47:42 +03:00

12 lines
351 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'flatMap{}.firstOrNull{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().flatMap{}.firstOrNull{}'"
fun foo(list: List<String>): String? {
<caret>for (s in list) {
for (line in s.lines()) {
if (line.isBlank()) continue
return line
}
}
return null
}