Files
kotlin-fork/idea/testData/intentions/loopToCallChain/takeWhile_nestedLoop.kt.after
T
Valentin Kipyatkov 3f563f7058 takeWhile supported
2016-08-16 17:38:06 +03:00

7 lines
240 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with '+= flatMap{}.takeWhile{}'"
fun foo(list: List<String>, target: MutableCollection<Int>) {
<caret>target += list
.flatMap { it.indices }
.takeWhile { it <= 1000 }
}