3 ms·
It seems as though one could have the transition to the terminal state return a unique type, and then execute the entire state machine inside a function whose r
by kibwen 9y ago
It seems as though one could have the transition to the terminal state return a unique type, and then execute the entire state machine inside a function whose return type is the return type of the terminal transition, yes?
- masklinn 9y agoSure but now you can't really drive the state machine can you? The state machine has to drive you and provide callbacks for state transitions, something like that. edit: ah I see you'd extract the entire manipulation in a function which would return a terminal type or union thereof, yeah that'd work I guess.