RosettaCodeData/Task/Flatten-a-list/Common-Lisp/flatten-a-list-1.lisp
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

4 lines
145 B
Common Lisp

(defun flatten (structure)
(cond ((null structure) nil)
((atom structure) (list structure))
(t (mapcan #'flatten structure))))