This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-28
Channels
- # adventofcode (6)
- # beginners (61)
- # boot (1)
- # chestnut (1)
- # cider (18)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (176)
- # clojure-android (8)
- # clojure-germany (12)
- # clojure-russia (4)
- # clojure-spec (7)
- # clojure-uk (5)
- # clojurescript (28)
- # css (10)
- # cursive (36)
- # datomic (7)
- # devcards (1)
- # docs (8)
- # emacs (17)
- # fulcro (29)
- # hoplon (28)
- # lein-figwheel (3)
- # leiningen (37)
- # lumo (1)
- # off-topic (54)
- # om (6)
- # re-frame (2)
- # reitit (7)
- # ring-swagger (23)
- # shadow-cljs (115)
- # sql (10)
- # uncomplicate (1)
- # unrepl (24)
is there a way to spec a map using a coll of types/keywords (instead of a single type/keyword as with multi-spec)? the idea is that all specs corresponding to matched types are merged and used to validate the map
what i have is { ::types [:first :second] }
and what i'm looking for is a way to create something like a multi-spec which dispatches on the values in the coll corresponding to ::types
and which will build a spec like (s/merge ::first ::second)
(defmulti types ::types)
(defmethod types :default [{::keys[types]}]) (eval
(apply s/merge types)))`
Some lke this?
Hi. I have a vector of s/keys
specs and I would like to merge them, without eval. As s/merge
is a macro, I guess I should use merge-spec-impl
?