[REBOL] Re: A Rebol Challenge. The Monty Hall Puzzle
From: rebol:optushome:au at: 16-Dec-2001 23:58
> REBOL[]
> d: {123}w: 0 loop n: 500 [
> p: func[s][copy/part random s 1]
> b: p d c: p d if b = p union b c [w: w + 1]]
> w / n
>
> d: represents the choices - could have been any series of 3 elements e.g
> [box1 box2 box3]
> p: makes a random selection from a series
Hi Brett,
Just to point out a lesser known refinement of random
p: func[s][copy/part random s 1]
I think could be replaced by
p: func[s][random/only s]
Cheers,
Allen K