automatons written in clojure