This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-03
Channels
- # admin-announcements (1)
- # beginners (4)
- # boot (1)
- # chestnut (2)
- # clara (1)
- # cljs-dev (8)
- # cljsjs (50)
- # clojure (40)
- # clojure-austin (3)
- # clojure-brasil (3)
- # clojure-canada (1)
- # clojure-gamedev (2)
- # clojure-italy (3)
- # clojure-russia (19)
- # clojure-spec (14)
- # clojure-uk (1)
- # clojurescript (60)
- # core-async (4)
- # cursive (4)
- # datomic (3)
- # editors-rus (2)
- # emacs (4)
- # events (1)
- # figwheel (2)
- # flambo (4)
- # hoplon (94)
- # jobs (4)
- # leiningen (3)
- # om (9)
- # onyx (64)
- # re-frame (86)
- # reagent (52)
- # spacemacs (4)
- # test-check (1)
- # yada (31)
hello all, I am experimenting with accumulators and face following problem where I would need your expertise. I have following rule: (def oldest-person (acc/max :age :returns-fact true)) (defrule get-oldest-person [?senile-person <- oldest-person :from [Person (= ?name name)]] => (println (str "The oldest person is aged " (.getAge ?senile-person) ". The person's name is " ?name)) ) The Person fact is a java bean. The accumulator doesn't seem to do anything with the :age variable, as the output is not accumulated: The oldest person is aged 50. The person's name is Person 3 The oldest person is aged 150. The person's name is Person 4 The oldest person is aged 200. The person's name is Person 1 The oldest person is aged 100. The person's name is Person 2 I suspect I am not passing the right variable binding to the accumulator, but I am not sure what to change. (.getAge) instead of :age throws an exception when compiling. Thanks for any pointers.