For the first assignment for the course https://www.coursera.org/course/progfun
I would like to do the following
val l1 = List(1,2,3)
val l2 = List(4,5,6)
val lSum = l1.someOperation(l2)
RES: lSum=List(5,7,9)
I could implement someOperation with a loop, but that does not look very scalarish, I am wondering if there is a built in function to achieve this.
You may zip them and perform addition as usually in map: