;the random function chooses a number between 0(inclusive) and n(exculsive) (defun pick (the-list) (nth (random (length the-list)) the-list) ) ;[2]> (pick '(1 2 3 4)) ;4 ;[3]> (pick '(1 2 3 4)) ;4 ;[4]> (pick '(1 2 3 4)) ;2 ;[5]> (pick '(1 2 3 4)) ;3 ;[6]> (pick '(1 2 3 4)) ;3 ;[7]> (pick '(1 2 3 4)) ;1 ;[16]> (pick '(a b c d)) ;A ;[17]> (pick '(a b c d)) ;B ;[18]> (pick '(a b c d)) ;A ;[19]> (pick '(a b c d)) ;C ;[20]> (pick '(a b c d)) ;D ;[21]> (pick '(a b c d)) ;D ;[22]> (pick '(1 a 3 b 3 c)) ;B ;[23]> (pick '(1 a 3 b 3 c)) ;1 ;[24]> (pick '(1 a 3 b 3 c)) ;B ;[25]> (pick '(1 a 3 b 3 c)) ;1 ;[26]> (pick '(1 a 3 b 3 c)) ;3 ;[27]> (pick '(1 a 3 b 3 c)) ;3 ;[28]> (pick '(cat dog squarel snake)) ;SNAKE ;[29]> (pick '(cat dog squarel snake)) ;SQUAREL ;[30]> (pick '(cat dog squarel snake)) ;SQUAREL ;[31]> (pick '(cat dog squarel snake)) ;SQUAREL ;[32]> (pick '(cat dog squarel snake)) ;CAT ;[33]> (pick '(cat dog squarel snake)) ;SQUAREL ;Break 1 [41]> (pick '("Bob" "Bobby" "Robert" "Bo")) ;"Bobby" ;Break 1 [41]> (pick '("Bob" "Bobby" "Robert" "Bo")) ;"Bobby" ;Break 1 [41]> (pick '("Bob" "Bobby" "Robert" "Bo")) ;"Bob" ;Break 1 [41]> (pick '("Bob" "Bobby" "Robert" "Bo")) ;"Bobby" ;Break 1 [41]> (pick '("Bob" "Bobby" "Robert" "Bo")) ;"Bobby"