MathGroup Archive 2005

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

Search the Archive

Re: List searching

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57544] Re: List searching
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 1 Jun 2005 06:01:29 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <d7h9gm$3go$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

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

will test for multiple elements in lst and

and

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

will do the second test.

Regards

  Jens

"Guy Israeli" <guyi1 at netvision.net.il> schrieb im 
Newsbeitrag news:d7h9gm$3go$1 at smc.vnet.net...
> 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