Fork me on GitHub

I shared at a Clojure meetup tonight... the general notion was well received 🙂

🎉 4
Alex Miller (Clojure team)02:06:06

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

Alex Miller (Clojure team)02:06:41

however, this is a case where you are better served by using (s/coll-of vector?) instead

Alex Miller (Clojure team)02:06:13

user=> (s/def ::x (s/coll-of vector?))
user=> (s/conform ::x #{[:a]})


Thanks Alex, I was just changing to (s/nilable (s/coll-of vector?)) locally

Alex Miller (Clojure team)02:06:36

ah yes, nilable will be good too

Alex Miller (Clojure team)02:06:50

if the output collection is important, you can use the :into clause in coll-of

Alex Miller (Clojure team)02:06:00

otherwise it should match the original value


"ClojureScript Support for Foreign Libraries via NPM" ?


Yeah. The story there was that someone wanted to use something from NPM and then unfortunately used :npm-deps


We should probably mark that compiler option as alpha if not already. (My sense was that there was an expectation that it would just work.)

✔️ 4

I'll check up and file a site change...


cool, thanks