I\'ve been trying to find a way to condense nested lists into numbers that go back in the original list, but I having some trouble.
I\'ve been looking at the flatte
(defun flatten (l)
Above defines a function FLATTEN with one argument called L.
(cond
IF
((null l) nil)
the value of the argument L is the empty list, return the empty list.
((atom l) (list l))
or if the argument L is an atom (i.e. not a list), then return a list with the atom as its only item.
(t
or else we have a non-empty list
(loop for a in l
then loop through all the items in the list which is the value of L
appending (flatten a)
and append the results of flattening each list item.
))))