Files
kotlin-fork/idea/testData/intentions/loopToCallChain/flatMap.kt
T
2016-08-16 17:38:02 +03:00

10 lines
258 B
Kotlin
Vendored

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