Also, what on earth is a "state machine", please? I think I have a delicate grasp on it, but it's slipping away as a barely formed thought.
I know less than nothing about Lisp but there are plenty of books. Amazon has them and so does Alibris.
As to state machines, they are nothing more than a 'switch' statement with a lot of 'case' statements. Think of it as the kid's game 'Simon Says'. You can't make a move until 'Simon Says'.
First, we have a variable 'state' which indexes into the case statements. In each case, there is the opportunity, under some condition, or no condition at all, to change the 'state' variable so that the next time the 'switch' statement is executed, it changes to a different state, a different case.
Sometimes the 'case' values are set with an 'enum' so that the case labels make some kind of sense.
This page has a couple of FSMs. Note the 'enum' in the first example and then look where the author didn't carry the idea forward. It just makes sense to name the states.
The second example is far more complex and tries to mimic the diagram of the FSM. I would still want to name the states.
https://stackoverflow.com/questions/31100824/finite-state-machine-in-cWe're in a state and when Simon says, we change to another state for the next pass through the switch statement. Otherwise, we keep executing the code for the present state every time the switch statement is executed. Simon Says!