Package fsm provides some utilities for messing with finite state machines.