sorry to overflow with so many questions.
I have the following:
(defun recursive-function (string) "returns list of strings"
;I am trying to return flat list
; create list L
(append (mapcar 'recursive-function L)))
But since recursive-function returns a list, I end up with a list of a list of a list…, whereas I want just a flat list.
What is the proper way for me to implement recursion on functions which take a scalar and return a list of scalars?
Thanks.
If I understood correctly, you can combine reduce and append to flatten the list before returning it.
Example:
Output:
In your case this might work: