A generator that generates a random value in the given (inclusive)
range that satisfies the predicate P.
A generator that generates a random value in the given (inclusive)
range that satisfies the predicate P. If the range is invalid,
the generator will not generate any value.