Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6682 > unrolled thread

fastern pattern test

Started byborges2003xx <borges2003xx@gmail.com>
First post2011-11-24 12:00 +0000
Last post2011-11-24 12:00 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  fastern pattern test borges2003xx <borges2003xx@gmail.com> - 2011-11-24 12:00 +0000

#6682 — fastern pattern test

Fromborges2003xx <borges2003xx@gmail.com>
Date2011-11-24 12:00 +0000
Subjectfastern pattern test
Message-ID<jalbl0$sg0$1@smc.vnet.net>
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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web