3 ms·
At first I had a version that wasn't using classes but it was sort of ugly as we have relatively large state (current_states, final_states, transitions) and you
by densh 15y ago
At first I had a version that wasn't using classes but it was sort of ugly as we have relatively large state (current_states, final_states, transitions) and you have to pass it along to every other function. It looks a little bit ugly:
https://gist.github.com/1377685 https://gist.github.com/1377685
Actually I'm a big fan of using plain functions whenever possible but in this case it doesn't seem to be a right solution