ArbitraryExtensions
Namespace: FsCheck
Extensons to transform Arbitrary instances into other Arbitrary instances.
Static members
Static member  Description 
Convert(arb, convertTo, convertFrom)
Signature: (arb:Arbitrary<'?209391> * convertTo:Func<'?209391,'?209392> * convertFrom:Func<'?209392,'?209391>) > Arbitrary<'?209392>
Type parameters: '?209391, '?209392

Construct an Arbitrary instance for a type that can be mapped to and from another type (e.g. a wrapper),
based on a Arbitrary instance for the source type and two mapping functions.

Filter(arb, filter)
Signature: (arb:Arbitrary<'?209394> * filter:Func<'?209394,bool>) > Arbitrary<'?209394>
Type parameters: '?209394

Return an Arbitrary instance that is a filtered version of an existing arbitrary instance.
The generator uses Gen.suchThat, and the shrinks are filtered using Seq.filter with the given predicate.

MapFilter(arb, map, filter)
Signature: (arb:Arbitrary<'?209396> * map:Func<'?209396,'?209396> * filter:Func<'?209396,bool>) > Arbitrary<'?209396>
Type parameters: '?209396

Return an Arbitrary instance that is a mapped and filtered version of an existing arbitrary instance.
The generator uses Gen.map with the given mapper and then Gen.suchThat with the given predicate,
and the shrinks are filtered using Seq.filter with the given predicate.
This is sometimes useful if using just a filter would reduce the chance of getting a good value
from the generator  and you can map the value instead. E.g. PositiveInt.
