Supported forEachIndexed

This commit is contained in:
Valentin Kipyatkov
2016-05-11 22:52:46 +03:00
parent f28dca1fd5
commit 4094d77782
7 changed files with 54 additions and 6 deletions
@@ -0,0 +1,7 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}.forEachIndexed{}'"
fun foo(list: List<String>) {
list
.map { it.substring(1) }
.forEachIndexed { index, s1 -> println(s1.hashCode() * index) }
}