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". Perhaps something like this:
(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)) another way:
(eval(cons 'max a))
(eval(cons 'min a)) If you sort the list then items the same will be next to each other so you can do things like count them up or delete duplicates.
页:
1
[2]