Created
January 27, 2009 19:19
-
-
Save EnigmaCurry/53486 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun flatten (lst) | |
(cond ((atom lst) lst) | |
((listp (car lst)) | |
(append (flatten (car lst)) (flatten (cdr lst))) | |
) | |
(t (append (list (car lst)) (flatten (cdr lst)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment