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