From 8750b11812efdf5ebc091b95817f66daa1cc1ebe Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sat, 20 Jul 2019 14:37:08 -0400 Subject: [PATCH] Fix defrule definition --- src/sicp_logic/core.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sicp_logic/core.clj b/src/sicp_logic/core.clj index 75bd330..ff2c511 100644 --- a/src/sicp_logic/core.clj +++ b/src/sicp_logic/core.clj @@ -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])))