I have defined a function that receives an array of arrays. I want to get the sum of all arrays. My question is how to make that sum.
def suma[T](args: WrappedArray[T]*)(implicit n: Numeric[T]) = {
args.transpose.map(_.sum)
}
def sum[T](arr: WrappedArray[WrappedArray[T]])(implicit n: Numeric[T]) = {
val result = suma( ______ )
}
I thought I use the defined "sum" , but not how to pass the contents of the container array. Like there is a much simpler way to do this. Any ideas?