CoCoA:Count

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Count

count the objects in a list

Description

This function counts the number of occurrences of the object E in the

list L.

Example

  L := [1,2,3,2,[2,3]];
  Count(L,2);
2
-------------------------------
  Count(L,[2,3]);
1
-------------------------------
  Count(L,<quotes>a</quotes>);
0
-------------------------------

Syntax

Count(L:LIST,E:OBJECT):INT

Distrib

Len

   <type>list</type>