Monty Hall problem: Difference between revisions

m
Line 278:
 
let cars n switch =
let rectotal f= nref cs0 =in
for i if= n1 =to 0 thenn csdo
let prize = play switch in
else
letif prize = play switchCar inthen
incr total
let result = match prize with Car -> 1 | Goat -> 0 in
done;
f (n - 1) (cs + result)
!total
in f n 0
 
let () =
Anonymous user