A simple finite state machine in Erlang and F#
Considering a very simple finite state machine (FSM) such as a code lock which requires you to enter a 4-digit numeric code and upon which will open the lock for a brief few seconds. Such a FSM have two states: Locked and Open. Every time a key is entered it checks the sequence of digits …