Given:
val a = Array[Array[Int]]
you can try:
for(inner <- a) yield { for (elem <- inner) yield { elem } }
The deeper question: WHY do you want to do this with ints? The whole point of using immutable types is to avoid such a construction.
If you have a more general Array[Array[T]] , then your main problem is how to clone an instance of T , and not how to deeply clone an array.
Kevin wright
source share