When truly picking uniformally shuffled lists from a given list, see:

http://telefonica.net/web2/koot/natural-to-permutation.scm

and try

(require srfi/27) ; for random-integer
(require "natural-to-permutation.scm")

(let*
    ((lst (build-list 1000 (lambda (k) (round (quotient k 10)))))
     (shuffler (make-K->P lst eq?))
     (K (random-integer (nPs lst eq?))))
  (time (shuffler K)))

Where random-integer is assumed to produce a uniform distribution.

Jos




_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Reply via email to