Fork me on GitHub
#clara
<
2018-01-09
>
cfleming01:01:54

In the example query:

(defquery get-promotions
  "Query to find promotions for the purchase."
  [:?type]
  [?promotion <- Promotion (= ?type type)])

cfleming01:01:38

Does the parameter :?type create a unification variable? i.e. are the param and the local variable ?type then the same thing?

cfleming01:01:50

I’m not sure I’m explaining that correctly.

mikerod03:01:32

@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.

mikerod03:01:41

So I think that is what you were saying.

cfleming09:01:32

@mikerod Thanks, that’s what I meant, yes.

wparker14:01:38

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

wparker19:01:13

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.

zylox22:01:11

are the dixon's related

zylox22:01:16

a question for the ages