11a3482970
#KT-38632 Fixed
10 lines
279 B
Plaintext
Vendored
10 lines
279 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'mapIndexed{}.sum()'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().mapIndexed{}.sum()'"
|
|
fun foo(list: List<Int>): Int {
|
|
val <caret>s = list
|
|
.mapIndexed { index, item -> item * index }
|
|
.sum()
|
|
return s
|
|
}
|