Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
MMZK1526 committed Jan 11, 2024
1 parent fb65a55 commit ce8c8a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Year2014/Exam.hs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ groupTransitions trans = M.assocs $ foldl worker initGroups trans

makeDA :: Automaton -> Automaton
-- Pre: Any cycle in the NDA must include at least one non-Eps transition
makeDA au@(s, ts, _) = (states M.! ((\(s, _, _) -> s) <$> initTrans), terminals, S.evalState (worker initTrans) M.empty)
makeDA au@(s, ts, _) = ( states M.! ((\(s, _, _) -> s) <$> initTrans)
, terminals, S.evalState (worker initTrans) M.empty )
where
terminals = snd <$> filter (\(k, v) -> and [t `elem` k | t <- ts]) (M.assocs states)
terminals = snd <$> filter (\(k, v) -> and [t `elem` k | t <- ts])
(M.assocs states)
initTrans = getFrontier s au
(trans, states) = S.runState (worker initTrans) M.empty
worker trs = do
Expand Down

0 comments on commit ce8c8a4

Please sign in to comment.