Fix defrule definition

This commit is contained in:
Jeremy Dormitzer 2019-07-20 14:37:08 -04:00
parent ade32d5bb9
commit 8750b11812

View File

@ -42,11 +42,11 @@
"Adds a new rule to the database."
(db/add-rule db (query-syntax-process rule)))
(defmacro defrule [db conclusion body]
(defmacro defrule! [db conclusion body]
"Convenience macro to add a new rule to the database.
Usage:
Usage example:
(defrule [grandparent ?x ?y]
(and [parent ?x ?z]
[parent ?z ?y]))"
`(add-rule! ~db (quote [conclusion body])))
`(add-rule! ~db (quote [~conclusion ~body])))