This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-23
Channels
- # announcements (2)
- # babashka (56)
- # beginners (30)
- # calva (79)
- # cider (5)
- # circleci (3)
- # clj-kondo (84)
- # cljfx (2)
- # cljsrn (3)
- # clojure (264)
- # clojure-czech (3)
- # clojure-europe (18)
- # clojure-spec (3)
- # clojurescript (12)
- # conjure (28)
- # cursive (5)
- # datomic (4)
- # deps-new (22)
- # fulcro (6)
- # graalvm (3)
- # jobs (1)
- # malli (1)
- # off-topic (23)
- # pathom (4)
- # portal (3)
- # practicalli (2)
- # quil (6)
- # reagent (20)
- # remote-jobs (3)
- # reveal (14)
- # ring (10)
- # shadow-cljs (5)
- # spacemacs (4)
- # xtdb (4)
what is the use case or rationale for s/map-of
not conforming the keys by default?
(s/conform
(s/map-of (s/or :s string? :b boolean?)
(s/or :s string? :b boolean?))
{"k" "v"})
; => {"1" [:s "1"]}
(s/conform
(s/map-of (s/or :s string? :b boolean?)
(s/or :s string? :b boolean?)
:conform-keys true)
{"k" "v"})
; => {[:s "k"] [:s "v"]}
Usually keys are things that are not changed by conforming (keywords, strings, longs, symbols) and there is cost to conforming things, so defaults to not doing it.