(defun func (in s f l)
(cond
((null in) (append l (list (list 'end (+ 1 f)))))
((eq (car in) 'foo) (foo-asd (cdr in) s f l))
((atom (car in))(atom-asd in (+ 1 s) (+ 1 f) l))
))
.
(defun atom-asd (in s f l)
(cond ((eql in nil) ())
(append l (list (list 'frob s (car in) (+ 1 f))))))
.
(defun foo-asd (in s f l)
(cond
((eql in nil) (append l (list (list 'frob s 'myst f))))
((func in s f (append l (list (list 'frob s 'myst (+ 1 f))))))
((foo-asd (cdr in) s f l))
))
.
Regarding this code if call (func '(foo x y) 0 0 ()) the function foo-asd will be called, then func is called again and it will enter the function atom-asd, when atom-asd ends it execution, all the program ends, without calling the recursive call foo-asd. I need foo-asd to be called, but i do not understand why it isn't called after atom-asd ends.
atom-asdis severely broken.