How can I generate a list of n unique elements picked from a set?
问题 How to generate a list of n unique values ( Gen[List[T]] ) from a set of values (not generators) using ScalaCheck? This post uses Gen[T]* instead of a set of values, and I can't seem to rewrite it to make it work. EDIT At @Jubobs' request I now shamefully display what I have tried so far, revealing my utter novice status at using ScalaCheck :-) I simply tried to replace gs: Gen[T] repeated parameter to a Set in what @Eric wrote as a solution here: def permute[T](n: Int, gs: Set[T]): Gen[Seq[T