test-check 2019-08-02

Is there a way to create a generator from a list of generators such that when it generates, it returns the same list with each element in the list generated?

Something like this:

(gen/let [my-things (map (fn [thing]
                           (get-gen-for thing))
                         my-things)])

@kenny is this different from (apply gen/tuple ...)?

Wow, so obvious haha. That's exactly it. Thanks 🙂

👍 1
Alex Miller (Clojure team) 2019-08-02T18:28:19.002600Z

or just s/gen of an s/tuple if you're using spec