Get new members in a old member list

Get new members in a old member list

devitg
Advisor Advisor
720 Views
3 Replies
Message 1 of 4

Get new members in a old member list

devitg
Advisor
Advisor

I can get two list form a csv file 

the first is the today list,  it have old and news members 

the second is the yesterday list , the old members , or the members up to yesterday 

 

I need to know which one are the new members 

 

List one 

(list a b c d e f ); the  today and yesterday

List two

(list a b d f) ; the yesterday 

I need a new list as 

(list  c e )  ; the today

Hope it help to help me 

 

 

 

 

0 Likes
721 Views
3 Replies
Replies (3)
Message 2 of 4

cadffm
Consultant
Consultant

No very long lists?

(vl-remove-if '(lambda(i)(member i L1))L2))

Sebastian

0 Likes
Message 3 of 4

Kent1Cooper
Consultant
Consultant

(setq TodayAndYesterday '(1 2 3 4 5 6))
(1 2 3 4 5 6)
(setq Yesterday '(1 2 4 6))
(1 2 4 6)
(setq Today (vl-remove-if '(lambda (x) (member x Yesterday)) TodayAndYesterday))
(3 5)

 

However, might the longer list ever contain any duplicates, and would it matter that (vl-remove) takes out all instances  of something it is asked to remove?  For example, if:

 

(setq TodayAndYesterday '(1 2 3 4 5 6 2 4 1))

 

that blue function above would still return just

(3 5)

Kent Cooper, AIA
0 Likes
Message 4 of 4

ВeekeeCZ
Consultant
Consultant

Look here on Lee's page, a lot of inspirational stuff.

http://www.lee-mac.com/uniqueduplicate.html

0 Likes