; your code goes here
(defun perm (l)
  (when (null l) (return-from perm nil))
  (when (= (length l) 1) (return-from perm (list l)))
  (mapcan (lambda (e) 
	    (mapcar (lambda (p)
		      (append (list e) p)) 
		    (perm (remove e l))))
	  l))

(dolist (p (perm '(1 2 3 4 5)))
	(format t "~A~%" p))