cljs.spec/coll-gen

functionremoved v1.9.183added v1.9.14Edit
(coll-gen pred init-coll)

Source docstring:
returns a function of no args that returns a generator of
collections of items conforming to pred, with the same shape as
init-coll
Source code @ clojurescript:src/main/cljs/cljs/spec.cljs
(defn coll-gen
  [pred init-coll]
  (let [init (empty init-coll)]
    (fn []
      (gen/fmap
        #(if (vector? init) % (into init %))
        (gen/vector (gen pred))))))