Is this the expected behavior?
(s/def ::entry-as (s/tuple #{:as} symbol?))
(s/def ::entry (s/or :the-as ::entry-as))
(s/def ::map (s/coll-of ::entry :kind map?))
(s/conform ::map '{:as e});; => {:as [:as e]}
I was thought it should return something like {:the-as [:as e]}
, because the branch in s/or
is tagged as :the-as
.
spec version 0.2.187
.By default, maps are nonconforming on keys, that logic may be modifying what you expect here. You could try adding :conform-keys true
to the coll spec and see if that helps
Yes, set :conform-keys true
will work. Thank you!
https://akovantsev.github.io/corpus/clojure-slack/clojure-spec filterable/searchable log for this channel on a single static/offline page 1. double click on any word to filter, 2. cmd+f to highlight matches with browser's search, 3. click any date/time to show filtered out nearby lines, for context 4. recur data extracted from https://clojurians-log.clojureverse.org/clojure-spec pages
little teaser:
@misha can you stop spamming all the channels with this and just put one in announcements or whatever?
sure
@misha Posting the clojure-slack level link to #news-and-articles would be fine. Not to #announcements since that is for Clojure code projects/libraries. But as Alex said, posting these links individually to channels as you add indexed versions is really annoying as we already have two existing searchable archives of nearly all channels here.
Thank you, Sean, if I add more - I’ll announce in news channel, which I didn’t know about. I am sorry to hear 3 specific links are perceived as spam and annoying, and answering the same questions few times a week-is not. Especially after I actually tried finding things in other “searchable log”, and decided that week of dev time investment is worth it instead, and is useful to others.