11 lines
302 B
Plaintext
Vendored
11 lines
302 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'filter{}.mapTo(){}'"
|
|
import java.util.ArrayList
|
|
|
|
fun foo(list: List<String>): List<Int> {
|
|
val result = ArrayList<Int>()
|
|
<caret>list
|
|
.filter { it.length > result.size }
|
|
.mapTo(result) { it.hashCode() }
|
|
return result
|
|
} |