Browse Source

Implement matrixSum

DricomDragon 5 years ago
parent
commit
246dc93905
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tp/mine-sweeper/main.hs

+ 3 - 0
tp/mine-sweeper/main.hs

@@ -73,6 +73,9 @@ gridMoves m =
     let allMov = tail $ cartesianProduct (.) hMov wMov in
     map (\f -> f m) allMov
 
+matrixSum::Mat -> Mat -> Mat
+matrixSum m1 m2 = zipWith (zipWith (+)) m1 m2
+
 
 -- Testing data