 a b)
updateEpsilonNFA enfa i = updateEpsilonNFA' enfa nxtStates
  where
    rs = concat $ L.map (\s -> matchRule i s (enfa^.rules))
                        (enfa^.currState)
    nxtStates = eclose (L.map (\(Rule _ _ ns) -> ns) rs) (enfa^.rules)
    updateEpsilonNFA' :: (Eq a) => EpsilonNFA a b -> [D.State a] -> Maybe (EpsilonNFA a b)
    updateEpsilonNFA' _ [] = Nothing
    updateEpsilonNFA' nfa ns = Just (nfa&currState.~ns)

runEpsilonNFA :: (Eq a) => EpsilonNFA a b -> [D.Input b] -> Maybe (EpsilonNF
updateEpsilonNFA :: (Eq a) => EpsilonNFA a b -> D.Input b -> Maybe (EpsilonNFA a b)
updateEpsilonNFA enfa i = updateEpsilonNFA' enfa nxtStates
  where
    rs = concat $ L.map (\s -> matchRule i s (enfa^.rules))
                        (enfa^.currState)
    nxtStates = eclose (L.map (\(Rule _ _ ns) -> ns) rs) (enfa^.rules)
    updateEpsilonNFA' :: (Eq a) => EpsilonNFA a b -> [D.State a] -> Maybe (EpsilonNFA a b)
    updateEpsilonNFA' _ [] = Nothing
    updateEpsilonNFA' nfa ns = Just (nfa&currState.~ns)
updateEpsilonNFA enfa i = updateEpsilonNFA' enfa nxtStates
  where
    rs = concat $ L.map (\s -> matchRule i s (enfa^.rules))
                        (enfa^.currState)
    nxtStates = eclose (L.map (\(Rule _ _ ns) -> ns) rs) (enfa^.rules)
    updateEpsilonNFA' :: (Eq a) => EpsilonNFA a b -> [D.State a] -> Maybe (EpsilonNFA a b)
    updateEpsilonNFA' _ [] = Nothing
    updateEpsilonNFA' nfa ns = Just (nfa&currState.~ns)