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

9 lines
328 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'flatMap{}.firstOrNull{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().flatMap{}.firstOrNull{}'"
fun foo(list: List<String>): String? {
val <caret>result: String? = list
.flatMap { it.lines() }
.firstOrNull { it.isNotBlank() }
return result
}