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