In Scala, this is how I sum the Int values of a multidimensional array:
val data = Array.ofDim[Int](200, 200, 200)
// fill data with Int values
val sum = data.map(i => i.map(j => j.sum).sum).sum
Is there a shorter, perhaps easier to read, way of getting the sum of the array?