better SHUFFLE
commit64a631d97e41951202aa64b7baa6e74fe16d7f33
authorNikodemus Siivola <nikodemus@random-state.net>
Wed, 19 Dec 2007 12:59:11 +0000 (19 14:59 +0200)
committerNikodemus Siivola <nikodemus@random-state.net>
Wed, 19 Dec 2007 12:59:11 +0000 (19 14:59 +0200)
treeb8256d81223942732dd1921c9806e05f6da08e7e
parent76e78e7962bb2eed94704bd6620034f8a36c2881
better SHUFFLE

 * Thanks to Sean Ross: implement the Fisher/Yates/Knuth algorithm
   correctly.

 * As penance, specialize for lists as well: travel along the list,
   swapping towards the end -- marginally more efficient then swapping
   along the whole length.
sequences.lisp