This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-16
Channels
- # ai (5)
- # announcements (47)
- # aws (11)
- # babashka (20)
- # beginners (85)
- # biff (1)
- # calva (72)
- # cider (9)
- # clj-kondo (37)
- # cljfx (9)
- # cljs-dev (1)
- # clojars (2)
- # clojure (61)
- # clojure-berlin (2)
- # clojure-europe (189)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-uk (2)
- # clojurescript (51)
- # conjure (3)
- # cursive (4)
- # data-science (6)
- # datomic (6)
- # events (5)
- # fulcro (16)
- # gratitude (9)
- # holy-lambda (9)
- # introduce-yourself (6)
- # lsp (13)
- # malli (8)
- # membrane (2)
- # off-topic (47)
- # pedestal (11)
- # re-frame (15)
- # reitit (1)
- # releases (2)
- # rewrite-clj (6)
- # rum (4)
- # shadow-cljs (2)
- # tools-deps (3)
- # xtdb (25)
- # yada (13)
just sanity-checking that this is appropriate - when using a registry, and having registered a spec for :my/keyword
e.g. :string
, then using that keyword in a :map, i simply do [:map [:my/keyword :my/keyword]]
- there isn't some simpler syntax to use similar to clojure.spec.alpha/keys
?
I believe you can replace the vector with just the qualified keyword. e.g., [:map :my/keyword]
sweet i'll try that!
also, i can use recursive :ref
in a mutable registry, right? update: yes you can
Is there a way to merge two constrained maps (`[:and [:map ...] [:fn ...]]`) together that doesn't drop the :fn
s of the second map? I haven't been able to figure it out so far, so (gen/sample-seq (mg/generator my-schema))
is giving results that fail m/validate
:thinking_face: with the latest master:
(mu/merge
[:and
[:map [:x :int]]
[:fn 'map?]]
[:and
[:map [:y :int]]
[:fn 'coll?]])
;[:and
; [:map [:x :int] [:y :int]]
; [:fn map?]
; [:fn coll?]]
looks correct @U8VJYTQ76?
Guess I just needed the weekend break -- found the issue this morning inside the function in my :fn