2 ms·
Do you have to adapt spec definition to core.match somehow? Is there a resource to read more how to use them together?
by jmiskovic 6y ago
Do you have to adapt spec definition to core.match somehow? Is there a resource to read more how to use them together?
- stingraycharles 6y agoNo you don't have to do anything. Let's say I have something like (s/def :thespec (s/or :foo ::foo :bar ::bar)) I can then use it in conjunction with core.match like (match [(s/conform :thespec val)] [:foo x] (do-something-with x) [:bar y] (do-something-else-with y)) Which imho is an easier way to navigate these things.