Fork me on GitHub
#test-check
<
2022-11-14
>
skylize03:11:41

Seems like (despite the plural name) gen/elements only returns 1 element per gen? Is that right? How do I gen a random quantity of elements?

(def map-and-1-key-from
  (gen/let [m (gen/not-empty
               (gen/map gen/keyword gen/any-equatable))
            ;; Surprisingly works as name above describes.
            ;; How would I make `map-and-some-keys-from` instead?
            k (gen/elements (keys m))]
    [m k]))

(def my-gen (map-and-1-key-from gen/keyword

hiredman03:11:10

vector of elements

👍 1