Fisher-Yates lists shuffle bif

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fisher-Yates lists shuffle bif

T Ty-2
Added a new bif to lists module for a Fisher-Yates shuffle taken from
Knuth's The Art of Computer Programming v2.

The seed to random(3) is initialize in beam_emu.c although there might
be a better place for it.

t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-Fisher-Yates-Knuth-fair-shuffle-to-lists-modul.patch
Type: text/x-patch
Size: 2870 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20070611/7d541bb4/attachment.bin>