// WITH_RUNTIME // INTENTION_TEXT: "Replace with 'takeWhile{}'" // IS_APPLICABLE_2: false fun foo(n: Int, list: List): List{ val result = mutableListOf() for (i in list) { if (i >= n) result.add(i) else break } return result }