FSM
Minimal automata classes for Python 3 and Scala.
As for Python, fsmsuper
and typed_stitched_aggro
are interesting.
The Scala implements a generalization; supporting an infinite number of states and arbitrary function transitions. For the operators see the tests cases.