Skip to content

Instantly share code, notes, and snippets.

@sshirokov
Created May 15, 2012 05:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sshirokov/2699337 to your computer and use it in GitHub Desktop.
Save sshirokov/2699337 to your computer and use it in GitHub Desktop.
hi-fsm, example code for CLOS FSM with MOP Flavor
(fsm:deffsm hi-fsm ()
())
(fsm:defstate hi-fsm :initial (fsm c)
(case c
(#\! :error)
(#\H :want-i)))
(fsm:defstate hi-fsm :want-i (fsm c)
(if (char-equal c #\i)
:done
(values :initial t)))
(fsm:defstate hi-fsm :done (fsm c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment