fork download
  1.  
  2. (defun set-link (a b)
  3. (if (eq a nil)
  4. b
  5. (progn
  6. (setf prev (cdr a))
  7. (setf (cdr a) b)
  8. (set-link prev a))))
  9.  
  10. (defun revert (list)
  11. (set-link list nil))
  12.  
  13. (print (revert '(a b c d e)))
Success #stdin #stdout 0s 10464KB
stdin
Standard input is empty
stdout
(E D C B A)