Thanks to Tom: Mistake in "(== q 'IN-ZONE)". Must be "(l/== q 'IN-ZONE)"
By the way. Can anybody recommend comprehensive documentation on core.logic and its API, with examples and so on? All I have found is sketchy and fragmentary.. суббота, 11 сентября 2021 г. в 20:15:50 UTC+3, ru: > Dear clojure users and team! > I have a simple core.logic program: > > (require '[clojure.core.logic :as l] > '[clojure.core.logic.pldb :as db]) > > (db/db-rel In-zone t z) > > (def bd (db/db-fact bd In-zone 'A 'B)) > > (println > (db/with-db bd > (l/run* [q] > (l/fresh [x y] > (In-zone x y) > (== q 'IN-ZONE))))) > > Why I get this error message? > > user=> (load-file "../programs/corelogic/search2.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 @233ae292; java.lang.Number is in module > java.base of loader 'bootstrap'), > compiling:(/home/ru/clojure/core.logic/../programs/corelogic/search2.clj:8:1) > > No any mention about numbers! > > Thanks in advance for the help. > Sincerely, > Ru > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/8b7af56b-b561-469e-a54f-a846d62d6847n%40googlegroups.com.