Merging loop with initialization before in more cases + better formatting

This commit is contained in:
Valentin Kipyatkov
2016-04-22 16:17:19 +03:00
parent 5ddac24cdd
commit e8904d7727
5 changed files with 48 additions and 13 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}'"
import java.util.*
fun foo(list: List<String>) {
bar()
val <caret>result = list.map { it.length }
}
fun bar(){}