Hi
My 'favorite'
(defun remove_doubles (lst)
(if lst
(cons (car lst) (remove_doubles (vl-remove (car lst) lst)))
)
)
EDIT: I read too fast.
If The answer to MP's questions in "yes", this should be:
(defun remove_same_car (l)
(if lst
(cons (car l)
(remove_same_car
(vl-remove-if
(function (lambda (x) (equal (caar l) (car x))))
(cdr l)
)
)
)
)
)
But none of these returns the expected result whith the example list:
(remove_doubles lst) --> (("m1-1" 10 20) ("m1-2" 50 20) ("m1-3" 45 67) ("m1-2" 2 4) ("m1-1" 20 20))
(remove_same_car lst) --> (("m1-1" 10 20) ("m1-2" 50 20) ("m1-3" 45 67))