Assume i have the following spec:
(ns example
(:require [clojure.alpha.spec :as s]))
(s/def ::val int?)
(s/def ::inner (s/schema [::val]))
(s/def ::container (s/coll-of ::inner
:into []))
(s/def ::outer (s/schema [::container]))
How does a s/select
look like so that ::container
is always in ::outer
and it may be empty, but if it has an element ::val
has to be there.
Eg, this should not be valid
[#:example{:container [{}]}]