Supported mapIndexedTo and mapIndexedNotNullTo

This commit is contained in:
Valentin Kipyatkov
2016-04-22 12:12:12 +03:00
parent 2652ea4233
commit b6e05e058e
10 changed files with 61 additions and 22 deletions
@@ -0,0 +1,5 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapIndexedNotNullTo(){}'"
fun foo(list: List<String?>, target: MutableList<Int>) {
<caret>list.mapIndexedNotNullTo(target) { index, s -> s?.substring(index)?.length }
}