3 ms·
You still create FSM's in functional languages though. Consider: data Light = On | Off toggle :: Light -> Light toggle On = Off toggle Off = On So, the dat
by stuffihavemade 14y ago
You still create FSM's in functional languages though. Consider:
data Light = On | Off
toggle :: Light -> Light
toggle On = Off
toggle Off = On
So, the data structures represent the possible states, and the associated functions the transitions.