I know there has to be a simple way to subtract the contents of one list from another. Any help?
any practical sample that i can take a look - to test.? -- Get your free DraftTeam version 1.4 copy, just download it from here http://www.draftteam.com/draftteam/draftteam.zip or sent your request to Offer ends on Friday, January 23 of 2004 from another. Any help?
Responding to keyword "simple", and a fuzzy understanding what you mean "contents of one list from another" ... (setq list1 '(1 2 3 4 5) list2 '(2 3 4) ) (vl-remove-if '(lambda (x) (member x list2)) list1 ) returns (1 5) I know there has to be a simple way to subtract the contents of one list from another. Any help?
Hi michael puckett , how about this below I would "(- list1 list2)" _$ (setq list1 '(1.9 2.8 3.7 4.8 5.7)) (1.9 2.8 3.7 4.8 5.7) _$ (setq list2 '(1.1 2.2 3.3 4.1 5.5)) (1.1 2.2 3.3 4.1 5.5)
_$ (mapcar '- list1 list2) (0.8 0.6 0.4 0.7 0.2) -- R. Robert Bell Hi michael puckett , how about this below I would "(- list1 list2)" _$ (setq list1 '(1.9 2.8 3.7 4.8 5.7)) (1.9 2.8 3.7 4.8 5.7) _$ (setq list2 '(1.1 2.2 3.3 4.1 5.5)) (1.1 2.2 3.3 4.1 5.5)
Or, alternatively, (setq list_c nil) (foreach el list_a (or (member el list_b)(setq list_c (cons el list_c))) )
????????????????????? _ (setq list_a '(1.9 2.8 3.7 4.8 5.7)) (1.9 2.8 3.7 4.8 5.7) _$ (setq list_b '(1.1 2.2 3.3 4.1 5.5)) (1.1 2.2 3.3 4.1 5.5) _$ (setq list_c nil) nil _$ (foreach el list_a (or (member el list_b)(setq list_c (cons el list_c)))) T