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