MathGroup Archive 2011

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

Search the Archive

fastern pattern test


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