MathGroup Archive 2005

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

Search the Archive

Re: List searching


MatchQ[lst, {___, a_, ___, a_, ___}]

will test for multiple elements in lst and


MatchQ[lst, {___, a_ /; a > CretainNumber, ___}]

will do the second test.



"Guy Israeli" <guyi1 at> schrieb im 
Newsbeitrag news:d7h9gm$3go$1 at
> Hello,
> I needed to test lists for certain elements 
> inside of it, however, since I
> didn't find the proper function I had to write 
> them myself.
> are there functions that can do the following:
> - tests (returns true or false) if within the 
> list there is an element that
> appears more than once
> - tests if there is an element in the list that 
> is bigger/smaller than a
> certain number
> I would really appreciate your help,
> Guy

  • Prev by Date: Re: reducing the time of constructing a List
  • Next by Date: Re: Re: Limit of list
  • Previous by thread: Re: List searching
  • Next by thread: Re: List searching