This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-13
Channels
- # announcements (1)
- # beginners (155)
- # calva (104)
- # cider (7)
- # clj-kondo (55)
- # cljdoc (2)
- # cljs-dev (19)
- # cljsrn (22)
- # clojure (230)
- # clojure-europe (1)
- # clojure-italy (15)
- # clojure-losangeles (8)
- # clojure-nl (11)
- # clojure-spec (20)
- # clojure-uk (30)
- # clojurescript (10)
- # code-reviews (32)
- # cursive (2)
- # data-science (6)
- # datascript (3)
- # datomic (141)
- # fulcro (1)
- # graphql (6)
- # jobs-discuss (19)
- # luminus (8)
- # off-topic (30)
- # pathom (2)
- # protorepl (8)
- # reagent (15)
- # reitit (3)
- # shadow-cljs (11)
- # tools-deps (1)
- # xtdb (8)
I shared https://gist.github.com/swannodette/ebd8b65f887318ba68579b6bea911daf at a Clojure meetup tonight... the general notion was well received 🙂
May also be relevant here: https://clojurians.slack.com/archives/C03S1L9DN/p1560391289354500
the regex specs are inherently for working with ordered collections. as such, it's inherently a little weird to support the regex ops on non-ordered collections (like sets) as the order is arbitrary. this was tightened up in the latest versions of spec
however, this is a case where you are better served by using (s/coll-of vector?)
instead
user=> (s/def ::x (s/coll-of vector?))
:user/x
user=> (s/conform ::x #{[:a]})
#{[:a]}
ah yes, nilable will be good too
if the output collection is important, you can use the :into
clause in coll-of
otherwise it should match the original value
here, a set
Yeah. The story there was that someone wanted to use something from NPM and then unfortunately used :npm-deps