Machines from lists
StateMachine.fromList creates transitions that steps through a series of states and then terminates.
Once in the ‘three’ state, will be considered done, since there is no possible transition from there.
StateMachine.fromListBidirectional is the same idea, but allow back-and-forth between states.
In the above example, sm2
will never be done, because it’s always possible for it to transition to some state.