Is there any more efficant way to convert list of type :
((1 2 3) (2 3 4) ((5 7 3)) (((G))) ((((A)))))
to list
(1 2 3 2 3 4 5 7 3 G A)
I've managed to do this only to this level
((1 2 3) (2 3 4) ((5 7 3)))
but I want for all levels of brackets...
Here is my code :
M.R.Code:(defun lstnlst1 (lst / lstn) (foreach el lst (if (= (listp el) nil) (setq lstn (cons el lstn)) (progn (foreach ee el (if (= (listp ee) nil) (setq lstn (cons ee lstn)) (progn (foreach e ee (if (= (listp e) nil) (setq lstn (cons e lstn)) ))) ))) )) (setq lstn (reverse lstn)) )