W3cubDocs

/Kotlin

flatten

fun <T> Array<out Array<out T>>.flatten(): List<T>

Returns a single list of all elements from all arrays in the given array.

fun <T> Iterable<Iterable<T>>.flatten(): List<T>

Returns a single list of all elements from all collections in the given collection.

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