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?
I’m not sure I’m explaining that correctly.
@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.
So I think that is what you were saying.
@mikerod Thanks, that’s what I meant, yes.
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.
are the dixon's related
a question for the ages