Which output is produced when the terminal operation runs?

from Collections
Kotlin 2.4.10 intermediate 2 min

Which output is produced when the terminal operation runs?

kotlin
fun main() {
    val values = listOf(1, 4, 2, 5)
    val pipeline = values.asSequence()
        .onEach { print("$it ") }
        .filter { it >= 4 }

    println(pipeline.take(1).toList())
}
Open in playground
Report an error