Re: Filtering same elements from two lists
- To: mathgroup at smc.vnet.net
- Subject: [mg67957] Re: Filtering same elements from two lists
- From: "dkr" <dkrjeg at adelphia.net>
- Date: Tue, 18 Jul 2006 05:50:51 -0400 (EDT)
- References: <e9frcp$2kg$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In[14]:= list1={{PLUS1, 55, 43}, {PLUS2, 555, 83},{PLUS3,100,200}} ; list2={{PLUS3,300,400},{PLUS1, 77,99},{PLUS2,52,103}}; In[16]:= Reap[Sow[Rest@#,First@#]&/@ Join[list1,list2],_,{#1,Sequence@@Flatten[#2]}&][[2]] Out[16]= {{PLUS1,55,43,77,99},{PLUS2,555,83,52,103},{PLUS3,100,200,300,400}} dkr