* Kragen Javier Sitaker <[EMAIL PROTECTED]> [2007-03-10 09:40]:
> (* I wonder if there's an efficient way to randomly shuffle a
>    list without mutation? *)

I think I remember seeing one somewhere, but I’m not sure whether
it was a shuffle or another similar operation. It was so simple
it seemed like it shouldn’t work, but did; if memory serves it
involved a multiplication deriving from the current index somehow
so that the fractional probabilities of picking an element would
sum up to 1.0 for all elements by the end of the shuffle(?).
Unfortunately I completely fail to recall where I saw it so I
can’t look up whether it was a shuffle and how it worked. :-(

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Reply via email to