标签: scala matrix functor scalaz
假设我将类型Matrix定义为Vector[Vector[Int]]并将两个矩阵相加:
Matrix
Vector[Vector[Int]]
type Matrix = Vector[Vector[Int]] val addup: (Matrix, Matrix) => Matrix = (_, _).zipped map ((_, _).zipped map (_ + _))
是否有一个库,它提供了通用zipped map,因此我可以简化addup?
zipped map
addup