Files
kotlin-fork/idea/testData/inspectionsLocal/collections/convertCallChainIntoSequence/simple.kt.after
T
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00

8 lines
312 B
Plaintext
Vendored

// PROBLEM: Call chain on collection could be converted into 'Sequence' to improve performance
// HIGHLIGHT: GENERIC_ERROR_OR_WARNING
// WITH_RUNTIME
fun test(): List<Int> {
return listOf(1, 2, 3).asSequence().filter { it > 1 }.map { it * 2 }.map { it * 3 }.map { it * 4 }.map { it * 5 }
.toList()
}