List of Result Generators
Generate an error result from a random generator of errors
Generate an ok result or an error result with 50-50 chance
This is simply implemented as follows:
result errorGenerator okGenerator =
frequency
[ (1, error errorGenerator)
, (1, ok okGenerator)
] (ok okGenerator)If you want to generate results with a different frequency, tweak those numbers to your bidding in your own custom generators.
Generate an ok result from a random generator of values