Fork me on GitHub
#test-check
<
2016-09-05
>
lvh20:09:10

I have a seq of generators; I’d like a generator that concats the seqs; how do I do that while keeping shrinking?

lvh20:09:17

(IIUC sample would work, but would break shrinking.)

lucasbradstreet20:09:54

Can you just do (gen/fmap #(reduce into [] %) (apply gen/tuple seq-of-generators)

lvh20:09:41

(I also just realized that I can just make the generator later; i.e. first compute the concat’d thing, then chuck.gen/subsequence from that)

lucasbradstreet20:09:57

Yeah, that would also work

lvh20:09:54

thanks 🙂 that was stumping me until I wrote it out 🙂