私には2つの解決策がありますが、1つはコンパイルされず、もう1つはより良いと思います:
object Foo extends App {
val vectors = List(List(1,2,3), List(2,2,3), List(1,2,2)) //just a stupid example
//transposing
println("vectors = " + vectors.transpose.map (_.sum)) //it prints vectors = List(4, 6, 8)
//folding
vectors.reduce {
case (a, b) => (a zip b) map {
case (x, y) => x + y
}
} //compiler says: missing parameter type for exp. function; arg. types must be fully known
}