Files
kotlin-fork/idea/testData/inspectionsLocal/collections/convertCallChainIntoSequence/noTargetCallChain3.kt
T
Toshiaki Kameyama 7e28cb1fe3 Call chain --> Sequence: take termination into account
Related to KT-15476
2018-08-08 11:02:47 +03:00

11 lines
200 B
Kotlin
Vendored

// PROBLEM: none
// WITH_RUNTIME
fun test(list: List<Int>): List<Int> {
return list
.reversed()
.<caret>map { it + 1 }
.dropLast(1)
.takeLast(2)
}