kotest-property / io.kotest.property.arbitrary / filter

filter

fun <A> Arb<A>.filter(predicate: (A) -> Boolean): Arb<A>

Returns a new Arb which takes its elements from the receiver and filters them using the supplied predicate. This gen will continue to request elements from the underlying gen until one satisfies the predicate.