Suppose I have
val foo : Seq[Double] = ... val bar : Seq[Double] = ...
and I wish to produce a seq where the baz(i) = foo(i) + bar(i). One
In Scala 2.8:
val baz = (foo, bar).zipped map (_ + _)
And it works for more than two operands in the same way. I.e. you could then follow this up with:
(foo, bar, baz).zipped map (_ * _ * _)