I have two lists, I want to sum each element in list A with the element in list B, producing a new list.
I can do it with:
List(1,2).zip(List(5,5)).map(t => t._1 + t._2)
Is there any simpler or neater way to do this in Scala?
In Clojure I can just do:
(map + [1 2 3] [4 5 6])
For two lists:
For three lists:
For n lists: