diff --git a/DFA.fs b/DFA.fs index f8fec60..5d599b2 100644 --- a/DFA.fs +++ b/DFA.fs @@ -18,7 +18,8 @@ let validateDFA (dfa:DFA) = dfa.acceptingStates |> List.map (fun x -> List.contains x dfa.states) |> List.filter not - |> List.length < 1 + |> List.length + |> (<) 1 let deltaIsComplete = // Gets the cartesian product of states * sigma @@ -31,7 +32,8 @@ let validateDFA (dfa:DFA) = // Checks if there is any result from delta which is not // a valid state |> List.filter (fun x -> not (List.contains x dfa.states)) - |> List.length < 1 + |> List.length + |> (<) 1 List.contains dfa.beginState dfa.states || allAcceptingStatesAreStates ||