pathMatrix :: (Bounded a, Eq a) => [[a]] -> D.Path D.V2 Double
pathMatrix matrix =
  pathList $ do
    (r, row) <- count matrix
    (c, val) <- count row
    return ((r,c), val)
  where count = zip [(0::Int)..]


-- | Same as 'pathList', but from an array.
pathMatrix :: (Bounded a, Eq a) => [[a]] -> D.Path D.V2 Double
pathMatrix matrix =
  pathList $ do
    (r, row) <- count matrix
    (c, val) <- count row
    return ((r,c), val)
  where count = zip [(0::Int)..]


-- | Same as 'pathList', but from an array.
pathMatrix matrix =
  pathList $ do
    (r, row) <- count matrix
    (c, val) <- count row
    return ((r,c), val)
  where count = zip [(0::Int)..]


-- | Same as 'pathList', but from an array.