Re: removing subelements
- To: mathgroup at smc.vnet.net
- Subject: [mg56119] Re: removing subelements
- From: Jon Harrop <usenet at jdh30.plus.com>
- Date: Sat, 16 Apr 2005 03:51:52 -0400 (EDT)
- References: <d3o0ta$bqn$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
borges2003xx at yahoo.it wrote:
> i'm a newbie. How implement the _faster functon_ which removes in a
> list every element that are a subelement.
> which means
> f[x]:= {..,{1,2,3,4},..,{2,3},..} removes {2,3}.
I'm not exactly sure what you're after but Complement[...] may do the trick:
In[1]:= Complement[{1,2,3,4}, {2,3}]
Out[1]= {1, 4}
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com