dave08
05/24/2021, 12:44 PMfun <T> Arb.Companion.of(arb: Arb<T>, vararg values: T): Arb<T> = arbitrary { rs ->
Arb.of(arb.next(rs), *values).next(rs)
}
used to make a new arb or choose from an existing value of the same type (I'm not sure if I implemented this in the best way though...)sam
05/24/2021, 1:23 PMdave08
05/24/2021, 1:25 PMof
it could very well be choose()
for my implementation.sam
05/24/2021, 2:20 PMdave08
05/24/2021, 2:21 PMsam
05/24/2021, 2:22 PMdave08
05/24/2021, 2:23 PMsam
05/24/2021, 2:23 PMdave08
05/24/2021, 2:25 PMfun <T> T.toArb() = Arb.constant(this)
?sam
05/24/2021, 2:25 PMfun <T> T.contstant() = Arb.constant(this)
dave08
05/24/2021, 2:27 PMT.constant()
isn't a bit too ambiguous?sam
05/24/2021, 2:27 PMdave08
05/24/2021, 2:31 PMfun <T> T.toConstArb() = Arb.constant(this)
sam
05/24/2021, 2:34 PM