This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-09
Channels
- # announcements (14)
- # architecture (42)
- # babashka (23)
- # beginners (37)
- # biff (8)
- # calva (2)
- # cider (3)
- # clara (42)
- # clerk (14)
- # clojure (55)
- # clojure-brasil (3)
- # clojure-dev (5)
- # clojure-europe (18)
- # clojure-hungary (88)
- # clojure-losangeles (3)
- # clojure-nl (1)
- # clojure-norway (66)
- # clojure-uk (9)
- # clojurescript (16)
- # core-logic (16)
- # datomic (6)
- # fulcro (32)
- # hyperfiddle (25)
- # instaparse (12)
- # joyride (2)
- # lsp (13)
- # malli (15)
- # off-topic (50)
- # polylith (11)
- # portal (3)
- # re-frame (2)
- # reitit (2)
- # sci (8)
- # shadow-cljs (16)
- # tools-deps (13)
- # xtdb (5)
Hello, I see how everyg
work, but is there a way to have something like someg
that checks whether any goal is true in a coll ?
when you everyg is a conjunction of goals and there is some other functional constructor of disjunctions, the macro constructor for disjunctions is conde
and* and or* turn a list of goals into a goal, which is not exactly what everyg does
(let [vars [(l/lvar) (l/lvar) (l/lvar)]]
(l/run* [q]
(l/== q vars)
(l/everyg #(fd/in % (fd/domain 1 2 3 4 5 6 7)) vars)
(l/or* (mapv #(l/== 7 %) vars))))
seems to work, thank you !ok, additional question: I want to check that at least n goals be successful in my coll, I've succeeded in doing that with project
but it seems pretty slow, any better way to do so ?
I think maybe a way to do it would be to take your collection of goals, generate all the n-ary permuations of them, then and* each permuation then or* all of them