11a3482970
#KT-38632 Fixed
13 lines
385 B
Plaintext
Vendored
13 lines
385 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
|
|
import java.util.ArrayList
|
|
|
|
fun foo(list: List<String>): List<Int> {
|
|
val result = ArrayList<Int>()
|
|
list
|
|
.asSequence()
|
|
.filter { it.length > result.size }
|
|
.forEach { result.add(it.hashCode()) }
|
|
return result
|
|
} |