-- Examples:
--
-- >>> let m = fromList [[1,2],[3,4]] :: Mat2 Int
--- >>> matmap (^2) m
+-- >>> map2 (^2) m
-- ((1,4),(9,16))
--
-matmap :: (a -> b) -> Mat m n a -> Mat m n b
-matmap f (Mat rows) =
+map2 :: (a -> b) -> Mat m n a -> Mat m n b
+map2 f (Mat rows) =
Mat $ V.map g rows
where
g = V.map f