fun toss_unbiased(): Int
{
while (true) {
val a = toss_biased()
val b = toss_biased()
if (a == 0 && b == 1){
return 0
}
if (a == 1 && b == 0){
return 1
}
}
}
fun toss_unbiased(): Int
{
while (true) {
val a = toss_biased()
val b = toss_biased()
if (a == 0 && b == 1){
return 0
}
if (a == 1 && b == 0){
return 1
}
}
}