Or you could use this: ``` inline fun <T> Ar...
# getting-started
b
Or you could use this:
Copy code
inline fun <T> Array<Array<T>>.forEach2D(action: (T) -> Unit): Unit {
    for (array in this) for (element in array) action(element)
}
f
Thanks but there is no function in the stdlib for that?
Just wondering
b
Nah
f
thanks
a
You could flatten first
arrayOf(arrayOf(1, 2), arrayOf(3, 4)).flatten().forEach(::println)
f
oh yea that works too