Files
kotlin-fork/idea/testData/intentions/loopToCallChain/firstOrNull_ifAssign_preserveComments.kt.after
T
2016-08-16 17:37:55 +03:00

7 lines
232 B
Plaintext
Vendored

// WITH_RUNTIME
fun foo(list: List<String>) {
<caret>val result: String? = list.firstOrNull { // search for first non-empty string in the list
it.length > 0
}// string should be non-empty
// save it into result
}