W3cubDocs

/Kotlin

flatten

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
fun <T> Sequence<Sequence<T>>.flatten(): Sequence<T>

Returns a sequence of all elements from all sequences in this sequence.

The operation is intermediate and stateless.

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
@JvmName("flattenSequenceOfIterable") fun <T> Sequence<Iterable<T>>.flatten(): Sequence<T>

Returns a sequence of all elements from all iterables in this sequence.

The operation is intermediate and stateless.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.sequences/flatten.html