Re: Filtering a list of list for certain elements that are neighbours

*To*: mathgroup at smc.vnet.net*Subject*: [mg88896] Re: Filtering a list of list for certain elements that are neighbours*From*: Steven Siew <stevensiew2 at gmail.com>*Date*: Tue, 20 May 2008 06:54:02 -0400 (EDT)*References*: <g0p4a2$nc4$1@smc.vnet.net>

Oops, I forgot about Valeri Steven Siew ------------------- (9) Valeri Astanoff In[1]:= mylist={{a,b,c},{a,c,b},{b,a,c},{b,c,a},{c,a,b},{c,b,a}}; In[2]:= mylist//.{{x___List,{u___,a,b,v___},z___List}\[Rule]{x,z},{x___List, {u___,b,a,v___},z___List}\[Rule]{x,z}} Out[17]= {{a,c,b},{b,c,a}}