MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

fastern pattern test

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123128] fastern pattern test
  • From: borges2003xx <borges2003xx at gmail.com>
  • Date: Thu, 24 Nov 2011 06:55:50 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

please help a beginner.
I need to clear every list in which there are two sublist with a
property (in this case,equals and with length >= 2) ,not overlapping.
Is there a faster way, perhaps using PatternTest (?).
Thanx in Advance

Clear[mm]
mm[{___, b1__, ___, b1__, ___}] := {} /; Length[{b1}] >= 2
mm[l_] := l
pool = Strings[{0, 1}, 6];
s1 = Rest[Union[Map[mm, pool]]]

Best Regards



  • Prev by Date: Re: Bad Precision output for SphericaBesselY and BesselY
  • Next by Date: Re: Sorting strings
  • Previous by thread: Re: Systems of linear equations
  • Next by thread: how to project vertex along a tangent