Fix negation

(to the broken version of "negation" given in SICP)
This commit is contained in:
Jeremy Dormitzer 2019-07-14 23:03:29 -04:00
parent 7ca03e42d9
commit 60c7eac861

View File

@ -19,9 +19,11 @@
(disjoin db (rest disjuncts) input-frames))))
(defn negate [db operands input-frames]
(filter
(mapcat
(fn [frame]
(empty? (qeval db (first operands) [frame])))
(if (empty? (qeval db (first operands) [frame]))
[frame]
[]))
input-frames))
(defn execute [exp]