Good afternoon,
I have a question in relation with recursion. Is it possible to use the lispfunction in order to call a function that uses a recursive process?
I ask that why… I have a lisp function in cl-user that every time I load the patch the function appears dead. I forget sometimes to compile the lisp file in the editor in advance…
The code:
(in-package :cl-user)
(defun noconseqrep (lista)
(cond
((null lista) nil)
((null (cdr lista)) lista)
((eql (first lista) (first (rest lista)))
(noconseqrep (rest lista)))
(t (cons (first lista) (noconseqrep (rest lista))))
)
)
It is not my code but it is useful to clean consecutive repetitive atoms in a list…
Thank you in advance!
Dimitris