X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Frandom.lisp;h=53f423b53da6a85b38702d318405354a43e9061b;hb=71b6fc1cd91159a5ff28432701dea1fe85831df1;hp=1052f3527a95614e56015ed411b60f0f546a5bab;hpb=3074223314aa4655a09fb0654c83563782e6e7d2;p=fiveam.git diff --git a/src/random.lisp b/src/random.lisp index 1052f35..53f423b 100644 --- a/src/random.lisp +++ b/src/random.lisp @@ -242,7 +242,7 @@ the approximate size of the tree, but don't try anything above 30, you have been warned. ELEMENTS must be a generator which will produce the elements." (labels ((rec (&optional (current-depth 0)) - (let ((key (random (+ 3 (- depth current-depth))))) + (let ((key (random (+ 3 (- size current-depth))))) (cond ((> key 2) (list (rec (+ current-depth 1)) (rec (+ current-depth 1))))