- A generic finite state machine.
- initial state, List of all possible states and mapping of transitions
-
machine accepts the initial state, and list of states
-
state - initial, loading, loaded, failed
-
event - loadData
-
action - func(state) -> state
-
statemachine (initial state, event -> action mapping )