We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 94dfeb8 + 18d73cd commit b84b5a0Copy full SHA for b84b5a0
src/main/scala/org/scalacheck/Gen.scala
@@ -489,7 +489,7 @@ object Gen extends GenArities{
489
490
/** Makes a generator result optional. Either `Some(T)` or `None` will be provided. */
491
def option[T](g: Gen[T]): Gen[Option[T]] =
492
- oneOf[Option[T]](some(g), None)
+ frequency(1 -> const(None), 9 -> some(g))
493
494
/** A generator that returns `Some(T)` */
495
def some[T](g: Gen[T]): Gen[Option[T]] =
0 commit comments