Hello guys! I'm trying to write my own remove-duplicates function. The code I have written so far works fine when the repeating elements of the list are non-adjacent, but it doesn't work at all when they are. Any suggestions? Thank you in advance.
(defun uniq (L)
(if (= (length L) 0) NIL
(if (> (length L) 1)
(uniq (delete (first L) L))))
L)