A simple State Machine operating on a list of input values, a map of transition definitions and an accumulator.
Runs the state machine by finding and executing transitions