cljs.spec/coll-of
macro | removed v1.9.542 | added v1.9.14 | Edit |
(coll-of pred & opts)
Source docstring:
Returns a spec for a collection of items satisfying pred. Unlike
generator will fill an empty init-coll.
Same options as 'every'. conform will produce a collection
corresponding to :into if supplied, else will match the input collection,
avoiding rebuilding when possible.
Same options as 'every'.
See also - every, map-of
(defmacro coll-of
[pred & opts]
(let [desc `(coll-of ~(res &env pred) ~@(res-kind &env opts))]
`(every ~pred ::conform-all true ::describe '~desc ~@opts)))