I want to (more or less) flatten a list. The input is composed of nested lists which may be quoted, and I want to have a list of global variables in the end. I check whether first
starts with *
, but I end up with a list containing quote
.
Edit:
The data I had to deal was structured like this:
(defparameter *colors* '(*red* *green* *blue*))
(defparameter *animals* '(*mouse* *elephant*))
(defparameter *list-to-flatten* '('*colors*
'*animals*
*some-other-parameter*))
I had created the basic parameter names like *red*
or *mouse*
because the names in the original data were less than ideal, but I still had to use them to interact with the system. These parameters were lists, i.e. *mouse*
--> (animal mammal small 4)
, and were not to be flattened. So I wrote a function that reduced a nested list to a list of those basic parameters, and that list contained quotes.
Since then, I saw that the data I had originally gotten was badly out of date and I had to start over. The parameter names of the current data are named much more sensibly, so I do not need to deal with the original problem anymore.
I had overread the answer here.