scalaで内積

var a=List(1,2,3,4);
var v=List(2,3,4,5);
a.zip(v).map{i=> i._1*i._2;}.sum
res15: Int = 40