test-check

kenny 2019-08-02T18:06:45.000600Z

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?

kenny 2019-08-02T18:08:12.000800Z

Something like this:

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

2019-08-02T18:10:23.001400Z

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

kenny 2019-08-02T18:11:01.002Z

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

👍 1
alexmiller 2019-08-02T18:28:19.002600Z

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