Hi,
Thank you folks for the hints. I think I may have it working now using setf.
(defun random-element (list)
(nth (random (length list)) list))
(defvar mylist '(0.5 100.0 200.25 4000.0 1.0 0.33 0.1 0.2 5000.0 2.0))
(defvar *test* '(nil)) ;global list
(loop
for i from 0 to 9 by 1
for xx in mylist collect (random-element mylist) into atest ;collect
into local list
finally (setf *test* atest) ;setf local list to global one
)
(loop
for i from 0 to 9 by 1
for xx in *test* ;access global list
do
(format t " ~A" xx)
)
_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist