I'm not sure if there is a straight-forward function to detect this... I would be inclined to make a comparison between every item in the list and make a list of items already "viewed".
(defun getrep (alist) (foreach x alist (if (member x nlist) (setq dlist (cons x dlist)) (setq nlist (cons x nlist)))) dlist)(defun c:test () (alert (vl-princ-to-string (getrep '(a b c c d e f f g)))) (princ))