Skip to content

Instantly share code, notes, and snippets.

@tkhoa2711
Last active August 29, 2015 14:11
Show Gist options
  • Save tkhoa2711/516800ce50370f8f2385 to your computer and use it in GitHub Desktop.
Save tkhoa2711/516800ce50370f8f2385 to your computer and use it in GitHub Desktop.
Reverse nested list in Common Lisp
(defun reverse-nested-list (list)
"reverse nested list"
(mapcar #'(lambda (l)
(if (not (consp l))
l
(reverse-deep l)))
(reverse list)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment