This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-09
Channels
- # adventofcode (1)
- # aleph (2)
- # beginners (28)
- # boot (26)
- # boot-dev (8)
- # cider (10)
- # clara (10)
- # cljs-dev (130)
- # cljs-experience (1)
- # cljsrn (12)
- # clojure (118)
- # clojure-austin (40)
- # clojure-boston (1)
- # clojure-chicago (1)
- # clojure-dusseldorf (1)
- # clojure-estonia (11)
- # clojure-france (1)
- # clojure-greece (3)
- # clojure-italy (19)
- # clojure-nl (1)
- # clojure-russia (1)
- # clojure-spec (19)
- # clojure-uk (34)
- # clojurescript (62)
- # core-logic (7)
- # cursive (11)
- # datomic (35)
- # emacs (15)
- # fulcro (264)
- # jobs (4)
- # leiningen (5)
- # midje (4)
- # off-topic (74)
- # onyx (27)
- # planck (14)
- # protorepl (4)
- # re-frame (37)
- # reagent (62)
- # rum (2)
- # shadow-cljs (171)
- # slack-help (5)
- # spacemacs (6)
- # specter (9)
In the example query:
(defquery get-promotions
"Query to find promotions for the purchase."
[:?type]
[?promotion <- Promotion (= ?type type)])
Does the parameter :?type
create a unification variable? i.e. are the param and the local variable ?type
then the same thing?
@cfleming the keyword arg allows the caller to bind a value to the variable. The same variable name as a symbol then should appear somewhere in the query conditions.
Put differently: looking at the example in http://www.clara-rules.org/docs/queries/ if you removed the :?type from the get-promotions query definition you wouldn’t have “:?type :lunch” in the arguments in this call: (query session get-promotions :?type :lunch) @cfleming
Clara-rules 0.17.0 is released and on Clojars. This release is most significant for ClojureScript users, both because of a ClojureScript-specific bugfix and some enhancements with more impact to the ClojureScript side, but there are some enhancements for Clojure as well. See the changelog for details. Thanks to @dave.dixon and @alex-dixon for their contributions to the release.