Skip to content

Instantly share code, notes, and snippets.

@shaunr0b
shaunr0b / fsm.clj
Last active August 29, 2015 14:07 — forked from Pet3ris/fsm.clj
(ns fsm
(:refer-clojure :exclude [==])
(:use [clojure.core.logic]))
;; Encoding a Finite State Machine and recognizing strings in its language in Clojure core.logic
;; We will encode the following FSM:
;;
;; (ok) --+---b---> (fail)
;; ^ |