<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br>Thank you folks for the hints. I think I may have it working now using setf.<br><br>(defun random-element (list)<br> (nth (random (length list)) list))<br><br>(defvar mylist '(0.5 100.0 200.25 4000.0 1.0 0.33 0.1 0.2 5000.0 2.0))<br><br>(defvar *test* '(nil)) ;global list<br><br>(loop<br> for i from 0 to 9 by 1<br> for xx in mylist collect (random-element mylist) into atest ;collect into local list<br> finally (setf *test* atest) ;setf local list to global one<br> )<br><br>(loop<br> for i from 0 to 9 by 1<br> for xx in *test* ;access global list<br> do<br> (format t " ~A" xx)<br> )<br>                                            </div></body>
</html>