11a3482970
#KT-38632 Fixed
11 lines
417 B
Plaintext
Vendored
11 lines
417 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
//TODO: should not be available without "asSequence()"!
|
|
// INTENTION_TEXT: "Replace with 'filterNot{}.map{}.firstOrNull{}'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().filterNot{}.map{}.firstOrNull{}'"
|
|
fun foo(list: List<String>): Int? {
|
|
var index = 0
|
|
return list
|
|
.filterNot { it.isBlank() }
|
|
.map { it.length * index++ }
|
|
.firstOrNull { it * 100 > index * index }
|
|
} |