I can find many examples of setting maximum sizes for generators, but how do I generate lists between a min and max length?
A neat property about generators is they are composable, so you can simply compose a generator for the length of your list with a listOfN
generator.
for {
numElems <- Gen.choose(5, 12)
elems <- Gen.listOfN(numElems, elemGenerator)
} yield elems