clara

http://www.clara-rules.org/
cfleming 2018-01-09T01:48:54.000204Z

In the example query:

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

cfleming 2018-01-09T01:49:38.000048Z

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

cfleming 2018-01-09T01:49:50.000321Z

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

2018-01-09T03:18:32.000076Z

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

2018-01-09T03:18:41.000091Z

So I think that is what you were saying.

cfleming 2018-01-09T09:55:32.000125Z

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

2018-01-09T14:48:38.000748Z

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

2018-01-09T19:31:13.000002Z

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.

👍 2
🦜 2
🎉 3
zylox 2018-01-09T22:09:11.000190Z

are the dixon's related

👍 1
zylox 2018-01-09T22:09:16.000112Z

a question for the ages