I have create an associate list
mylist (list (list :a a)
(list :b b)
(list :c c))
later I need to check if the list contains an entry which has same value as a variable specified and if it does, then I want to delete the entry.
First I used member and it returned nil, why?
(dolist (myvar varlist)
(if (member myvar mylist) (setq mylist (delete myvar mylist))))
Then I took member function out and call delete directly, it still not working even though value at all the fields looked the same. Why?
(dolist (myvar varlist) (setq mylist (delete myvar mylist)))
Here is what I did, which is working:
(dolist (myvar varlist)
(dolist (elt mylist)
(if (equal myvar elt) (setq mylist (delete elt mylist)))
)
)
Is there another way to do it without using second dolist loop?
Puzzled!!!
Thanks!