Re: Fast way to select those elements from a list that are in another
- To: mathgroup at smc.vnet.net
- Subject: [mg87087] Re: Fast way to select those elements from a list that are in another
- From: "Jean-Marc Gulliet" <jeanmarc.gulliet at gmail.com>
- Date: Mon, 31 Mar 2008 02:05:51 -0500 (EST)
- References: <frt574$sj8$1@smc.vnet.net> <47EFACC1.90909@gmail.com>
On Mon, Mar 31, 2008 at 2:40 AM, Andrew Moylan <andrew.j.moylan at gmail.com> wrote: > Unfortunately, Pick[a, Thread[a == b]] doesn't perform the same task. In > your example, s3 typically evaluates to Sequence[]. That's why s1===s2===s3 > subsequently evaluates to true: > > s1===s2===s3 > >> SameQ[s1,s2,Sequence[]] > >> SameQ[s1,s2] > >> True > > This brings up an interesting quirk: you can only use SameQ to verify that > two things are identical if you can be sure that none of them is Sequence[]! <snip> You are right, of course. Sorry about my silly post! (I totally missed the point). Best regards. -- Jean-Marc