#!/usr/local/bin/sbcl --script (defun shuffle-list (ls &aux (len2 (1+ (length ls)))) (mapl (lambda (u) (rotatef (first u) (nth (random (decf len2)) u))) ls)) (let ((x (list 1 2 3 4 5))) (print (shuffle-list x))) (let ((x (list "1" "2" "3" "4" "5"))) (print (nreverse (reduce (lambda (acc s) (list* s "a" acc)) (cdr x) :initial-value (list (car x))))))