From: Chris Schumacher
Subject: Instance counter.
Date: 
Message-ID: <sl87t218qlj2oj2trqvcf5cpc6d05tlhne@4ax.com>
In ANSI Lisp, is there a predefined function that will count the
number of occurences of a number/symbol/list within a list?

Thanks,

				-==Kensu==-

From: Frank Buss
Subject: Re: Instance counter.
Date: 
Message-ID: <x38uk5wpivip.cikbf2m4bwh4$.dlg@40tude.net>
Chris Schumacher wrote:

> In ANSI Lisp, is there a predefined function that will count the
> number of occurences of a number/symbol/list within a list?

In Common Lisp there is "count", which should work for counting lists
within lists with ":test 'equal".

-- 
Frank Buss, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
From: Pascal Costanza
Subject: Re: Instance counter.
Date: 
Message-ID: <53hn4vF1smrj9U1@mid.individual.net>
Chris Schumacher wrote:
> In ANSI Lisp, is there a predefined function that will count the
> number of occurences of a number/symbol/list within a list?

[Give someone a fish and feed him for a day.]

The function is called count.

[Teach someone to fish and you feed him for a lifetime.]

Try (apropos "COUNT" 'common-lisp).

Also try (describe 'count) and (documentation 'count 'function).


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
From: Michael
Subject: Re: Instance counter.
Date: 
Message-ID: <2007021420073816807-spamtrap@ectosphenocom>
On 2007-02-14 19:17:34 -0500, Pascal Costanza <··@p-cos.net> said:

> [Give someone a fish and feed him for a day.]
> [Teach someone to fish and you feed him for a lifetime.]

I prefer:

Build a man a fire and he is warm for a night.
Set a man on fire and he is warm for the rest of his life.

Michael
From: Pascal Costanza
Subject: Re: Instance counter.
Date: 
Message-ID: <53in0hF1segblU1@mid.individual.net>
Michael wrote:
> On 2007-02-14 19:17:34 -0500, Pascal Costanza <··@p-cos.net> said:
> 
>> [Give someone a fish and feed him for a day.]
>> [Teach someone to fish and you feed him for a lifetime.]
> 
> I prefer:
> 
> Build a man a fire and he is warm for a night.
> Set a man on fire and he is warm for the rest of his life.

lol


Pascal

-- 
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/