initialStates

This function is used to provide a method for determining the initial state of the FSM in cases where there may be one or more named statemaps. In this case the state may be a stack or name / value pairs representing the map name and pushed state.

Parameters

init

Is a function that will use the context to provide a list which will be pushed on the stack. The last item in the list will become the current state.