嗨,
我在一个简单的core.logic程序中遇到了问题
(require '[clojure.core.logic :as l]
'[clojure.core.logic.pldb :as db])
(def facts
(db/db
[In-zone 'A 'B]))
(println
(db/with-db facts
(l/run* [q]
(l/fresh [x y]
(In-zone x y)
(== q 'IN-ZONE)))))
结果显示为
user=> (load-file "../PROGS/CL/inzone.clj")
CompilerException java.lang.ClassCastException: class clojure.core.logic.LVar cannot be cast to class java.lang.Number (clojure.core.logic.LVar is in unnamed module of loader clojure.lang.DynamicClassLoader @4d2015a9; java.lang.Number is in module java.base of loader 'bootstrap'), compiling:(/home/ru/clojure/core.logic-master/../PROGS/CL/inzone.clj:8:1)
哪里出错了?没有提到数字!
提前感谢任何帮助。