This repo contains the exercises worked through by the CS Cabal during our read-through of The Reasoned Schemer.
The exercises are done in Clojure using the core.logic
library.
Note that Clojure core.logic
varies a bit from MiniKanren
-
#s
and#u
ares#
andu#
. -
The first arg to
run*
should be a vector of symbols, i.e. use(run* [q] ...)
instead of(run* q ...)
. -
There is no
conj2
.run
andfresh
can take multiple clauses that are joined by conjunction (AND). -
There is no
disj2
. Useconde
instead.conde
represents the disjunction (OR) of its clauses. Each clause inconde
may in turn be a vector of constraints, joined by conjunction (AND). -
Instead of Scheme quasiquotes, use
list
and quote literal symbols, e.g. instead of`(foo ,q)
, use(list 'foo q)
.