Pierre Marais
04/16/2020, 10:33 AMval intArb = <http://Arb.int|Arb.int>(1, 10).map { i ->
println("generated $i")
}
intArb.values(RandomSource.Default).take(1).toList()
This is supposed to only print once, right? The output is always printed twice.
The same happens with a custom arbitrary:
val customArb = arb {
generateSequence { 1 }
}.map { i ->
println("customArb $i")
}
customArb.values(RandomSource.Default).take(1).toList()
In v3, it used to only print once