I'm still learning FSCheck, and recently needed a fixed collection of unique strings.
This works, but I suspect there is a more efficient way.
Arb.generate<Set<NonEmptyString>>
|> Gen.filter (fun s -> Set.count s > 9)
|> Gen.map (Seq.truncate 10)
Is there?
It's probably more efficient to build a set that you know contains exactly N strings, like this:
Note that
genSetwill build a set of any type, not justNonEmptyStrings.