numberPaths :: (Eq c) => System c b e a -> System Int b e a
numberPaths (System st ps) = let
  contToInt c = fromMaybe err $ lookup c $ zip (Map.keys ps) [0..]
  err = error "numberPaths: missing continue"
  in System
    { systemStart = mapContinues contToInt st
    , systemPaths = Map.mapKeys contToInt $ fmap (mapContinues contToInt) ps }
numberPaths :: (Eq c) => System c b e a -> System Int b e a
numberPaths (System st ps) = let
  contToInt c = fromMaybe err $ lookup c $ zip (Map.keys ps) [0..]
  err = error "numberPaths: missing continue"
  in System
    { systemStart = mapContinues contToInt st
    , systemPaths = Map.mapKeys contToInt $ fmap (mapContinues contToInt) ps }
numberPaths (System st ps) = let
  contToInt c = fromMaybe err $ lookup c $ zip (Map.keys ps) [0..]
  err = error "numberPaths: missing continue"
  in System
    { systemStart = mapContinues contToInt st
    , systemPaths = Map.mapKeys contToInt $ fmap (mapContinues contToInt) ps }