Exercise 8-6 (Gen.flatMap, Gen.sameParity, Gen.listOfN)