Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created February 11, 2012 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/1797313 to your computer and use it in GitHub Desktop.
Save michaelklishin/1797313 to your computer and use it in GitHub Desktop.
(defstates automata :initial :intermediate :final)
(deftransition automate to-intermediate
:from :initial
:to :intermediate
;; will raise IllegalStateException if guard returns false
:guard-fn valid?
;; callbacks
:before-fn log-transition :after-fn launch-missles)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment