This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-27
Channels
- # announcements (1)
- # aws (17)
- # babashka (2)
- # beginners (14)
- # calva (1)
- # cider (16)
- # clara (1)
- # clj-kondo (68)
- # cljdoc (2)
- # clojure (51)
- # clojure-dev (1)
- # clojure-italy (2)
- # clojure-spec (1)
- # clojure-uk (19)
- # clojurescript (34)
- # cursive (4)
- # fulcro (1)
- # heroku (3)
- # leiningen (36)
- # lumo (28)
- # music (2)
- # off-topic (16)
- # reagent (22)
- # specter (7)
- # sql (7)
Is there a way to write s/and
s without having the conformed value passed to the predicate? All of our s/and
predicates call s/unform
on the value before calling the actual predicate function. This seems unnecessary. For example:
(s/def ::base-metric
(s/and
::metric/metric
#(metric-bounds-lower-less-than-or-equal-to-upper?
(s/unform ::base-metric %))
#(metric-default-value-within-bounds?
(s/unform ::base-metric %))))