This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-05
Channels
- # architecture (2)
- # aws (1)
- # bangalore-clj (4)
- # beginners (97)
- # boot (35)
- # cider (8)
- # cljsjs (3)
- # cljsrn (35)
- # clojure (190)
- # clojure-dusseldorf (4)
- # clojure-italy (7)
- # clojure-poland (1)
- # clojure-russia (17)
- # clojure-spec (74)
- # clojure-uk (30)
- # clojureremote (2)
- # clojurescript (298)
- # code-reviews (18)
- # component (18)
- # cursive (18)
- # datascript (3)
- # datavis (2)
- # datomic (24)
- # dirac (17)
- # emacs (3)
- # garden (7)
- # hoplon (51)
- # jobs (2)
- # jobs-rus (2)
- # leiningen (4)
- # luminus (11)
- # mount (24)
- # off-topic (1)
- # om (32)
- # onyx (25)
- # pedestal (1)
- # powderkeg (9)
- # protorepl (6)
- # re-frame (11)
- # reagent (15)
- # spacemacs (6)
- # sql (35)
- # uncomplicate (1)
- # unrepl (74)
- # untangled (130)
- # yada (6)
is there an enforced order of the same-rules invocation? trying to add default value to the multy-definitions rule, but default some times gets returned before all the rule options are exhausted
using get-else
within multi-definition rule would always return after 1st rule definition execution
(let [rules '[[(rule-foo ?e ?v) [?e :foo/bar ?v]]
[(rule-foo ?e ?v) [?e :foo/baz ?v]]
[(rule-foo ?e ?v) [(ground :default) ?v]]]
conn (ds/create-conn)]
(ds/transact! conn [{:foo/bar "bar"}
{:foo/baz "baz"}
{:foo/qux "qux"}])
(ds/q '[:find ?e ?v
:in $ %
:where
[?e] ;; include all entities
(rule-foo ?e ?v)]
@conn rules))
=>>
#{[1 :default] [1 "bar"] [2 :default] [2 "baz"] [3 :default]}
how to avoid groupping-by/filtering result and get this right away?
#{[1 "bar"] [2 "baz"] [3 :default]}