Fix negation
(to the broken version of "negation" given in SICP)
This commit is contained in:
parent
7ca03e42d9
commit
60c7eac861
@ -19,9 +19,11 @@
|
|||||||
(disjoin db (rest disjuncts) input-frames))))
|
(disjoin db (rest disjuncts) input-frames))))
|
||||||
|
|
||||||
(defn negate [db operands input-frames]
|
(defn negate [db operands input-frames]
|
||||||
(filter
|
(mapcat
|
||||||
(fn [frame]
|
(fn [frame]
|
||||||
(empty? (qeval db (first operands) [frame])))
|
(if (empty? (qeval db (first operands) [frame]))
|
||||||
|
[frame]
|
||||||
|
[]))
|
||||||
input-frames))
|
input-frames))
|
||||||
|
|
||||||
(defn execute [exp]
|
(defn execute [exp]
|
||||||
|
Loading…
Reference in New Issue
Block a user