Files
kotlin-fork/idea/testData/intentions/loopToCallChain/mapTo.kt.after
T
2016-08-16 17:38:02 +03:00

7 lines
227 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filter{}.mapTo(){}'"
fun foo(list: List<String>, target: MutableList<Int>) {
<caret>list
.filter { it.length > 0 }
.mapTo(target) { it.hashCode() }
}