evaluate method
Implementation
@override
bool evaluate(String input) {
if (!hasValidInput(input)) return false;
final eClosure = epsilonClosure(initialState);
final states = eClosure
.map((closureState) => extendedTransition(closureState, input))
.reduce((a, b) => {...a, ...b});
return states.any(finalStates.contains);
}