This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-19
Channels
- # announcements (15)
- # babashka (4)
- # beginners (55)
- # calva (92)
- # cider (70)
- # circleci (1)
- # clj-kondo (136)
- # cljdoc (2)
- # clojars (11)
- # clojure (48)
- # clojure-australia (1)
- # clojure-europe (30)
- # clojure-nl (3)
- # clojure-sweden (2)
- # clojure-uk (7)
- # clojurescript (40)
- # conjure (5)
- # core-async (11)
- # cursive (55)
- # data-science (1)
- # datomic (10)
- # degree9 (2)
- # development-containers (15)
- # events (1)
- # fulcro (14)
- # gratitude (13)
- # helix (5)
- # lsp (35)
- # malli (10)
- # meander (18)
- # off-topic (24)
- # pathom (13)
- # polylith (12)
- # practicalli (6)
- # re-frame (13)
- # reagent (33)
- # reitit (4)
- # remote-jobs (1)
- # shadow-cljs (13)
- # spacemacs (31)
- # specter (1)
- # stepwise (2)
- # tools-deps (19)
- # vim (1)
- # xtdb (7)
an inline/hidden :and
would be my first guess, something like:
[:* [:and [:repeat {:min 2, :max 2} :int] [:fn (fn [[x y]] (= x y))]]]
:and
is already weird, as the first thing is used in utilities. I guess this is the reason why Schema named it constrained
. One Schema + constraints. Not “all the schmas”
I think it’s the same thing as key-relations for maps, but… sequence relations instead.
malli + meander here could look like:
[:*
[:and
[:repeat {:min 2, :max 2} :int]
[:relations
'[?min ?max]
'[:= ?min ?max]]
and maps:
[:and
[:map
[:min :int]
[:max :int]]
[:relations
'{:min ?min, :max ?max}
'[:> ?min ?max]]]