[racket-dev] How about adding this simple list-shuffling procedure to racket?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sun Nov 14 06:40:15 EST 2010

2010/11/12 Neil Toronto <neil.toronto at gmail.com>:
> Jon Rafkind wrote:
>> On 11/12/2010 02:25 PM, Eli Barzilay wrote:
>>> Any objections to `shuffle' in `racket/list'?
> No objections here. I will almost surely use this function in the future.
>> Dumb question but is this different from `shuffle-list' from games/cards ?
> Yes. The one in games/cards takes multiple shuffles to actually shuffle the
> list. I think it's supposed to mimic physically shuffling a deck.

Several shuffles are needed in order to make the the distribution uniform.
If I recall correctly, Knuth, writes that you need 7 shuffles.

Jens Axel

Posted on the dev mailing list.