blob: d0a8ce467815ec19e98d68168924e7479e0827df [file] [log] [blame]
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapIndexed{}.firstOrNull{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().mapIndexed{}.firstOrNull{}'"
fun foo(list: List<String>): Int? {
<caret>return list
.asSequence()
.mapIndexed { index, s -> s.length * index }
.firstOrNull { it > 0 }
}