multiply' m1@(Matrix r _ _) m2@(Matrix _ c _) = create r c $ \(i, j) -> dotProduct (RV.unsafeIndex avs $ i - 1) (RV.unsafeIndex bvs $ j - 1) where
    avs = RV.generate r $ \i -> getRow (i + 1) m1
    bvs = RV.generate c $ \i -> getCol (i + 1) m2
    dotProduct v1 v2 = V.foldl' (+) 0 $ V.zipWith (*) v1 v2
multiply' m1@(Matrix r _ _) m2@(Matrix _ c _) = create r c $ \(i, j) -> dotProduct (RV.unsafeIndex avs $ i - 1) (RV.unsafeIndex bvs $ j - 1) where
    avs = RV.generate r $ \i -> getRow (i + 1) m1
    bvs = RV.generate c $ \i -> getCol (i + 1) m2
    dotProduct v1 v2 = V.foldl' (+) 0 $ V.zipWith (*) v1 v2
multiply' m1@(Matrix r _ _) m2@(Matrix _ c _) = create r c $ \(i, j) -> dotProduct (RV.unsafeIndex avs $ i - 1) (RV.unsafeIndex bvs $ j - 1) where
    avs = RV.generate r $ \i -> getRow (i + 1) m1
    bvs = RV.generate c $ \i -> getCol (i + 1) m2
    dotProduct v1 v2 = V.foldl' (+) 0 $ V.zipWith (*) v1 v2