mmult :: Matrix -> Matrix -> Matrix
mmult m1 m2 = ((a1, a2, a3, a4),
               (b1, b2, b3, b4),
               (c1, c2, c3, c4),
               (d1, d2, d3, d4))
   where
      a1 = dotProduct row1 col1
      a2 = dotProduct row1 col2
      a3 = dotProduct row1 col3
      a4 = dotProduct row1 col4
      b1 = dotProduct row2 col1
      b2 = dotProduct row2 col2
      b3 = dotProduct row2 col3
      b4 = dotProduct row2 col4
      c1 = dotProduct row3 col1
      c2 = dotProduct row3 col2
      c3 = dotProduct row3 col3
      c4 = dotProduct row3 col4
      d1 = dotProduct row4 col1
      d2 = dotProduct row4 col2
      d3 = dotProduct row4 col3
      d4 = dotProduct row4 col4
      (row1, row2, row3, row4) = rows m1
      (col1, col2, col3, col4) = cols m2
mmult :: Matrix -> Matrix -> Matrix
mmult m1 m2 = ((a1, a2, a3, a4),
               (b1, b2, b3, b4),
               (c1, c2, c3, c4),
               (d1, d2, d3, d4))
   where
      a1 = dotProduct row1 col1
      a2 = dotProduct row1 col2
      a3 = dotProduct row1 col3
      a4 = dotProduct row1 col4
      b1 = dotProduct row2 col1
      b2 = dotProduct row2 col2
      b3 = dotProduct row2 col3
      b4 = dotProduct row2 col4
      c1 = dotProduct row3 col1
      c2 = dotProduct row3 col2
      c3 = dotProduct row3 col3
      c4 = dotProduct row3 col4
      d1 = dotProduct row4 col1
      d2 = dotProduct row4 col2
      d3 = dotProduct row4 col3
      d4 = dotProduct row4 col4
      (row1, row2, row3, row4) = rows m1
      (col1, col2, col3, col4) = cols m2
mmult m1 m2 = ((a1, a2, a3, a4),
               (b1, b2, b3, b4),
               (c1, c2, c3, c4),
               (d1, d2, d3, d4))
   where
      a1 = dotProduct row1 col1
      a2 = dotProduct row1 col2
      a3 = dotProduct row1 col3
      a4 = dotProduct row1 col4
      b1 = dotProduct row2 col1
      b2 = dotProduct row2 col2
      b3 = dotProduct row2 col3
      b4 = dotProduct row2 col4
      c1 = dotProduct row3 col1
      c2 = dotProduct row3 col2
      c3 = dotProduct row3 col3
      c4 = dotProduct row3 col4
      d1 = dotProduct row4 col1
      d2 = dotProduct row4 col2
      d3 = dotProduct row4 col3
      d4 = dotProduct row4 col4
      (row1, row2, row3, row4) = rows m1
      (col1, col2, col3, col4) = cols m2