CoCoA:Distrib

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)

Distrib

the distribution of objects in a list

Description

For each object E of a list L, let N(E) be the number of times E

occurs as a component of L. Then Distrib(L) returns the list whose

components are [E,N(E)].

Example

  Distrib([<quotes>b</quotes>,<quotes>a</quotes>,<quotes>b</quotes>,4,4,[1,2]]);
[[<quotes>b</quotes>, 2], [<quotes>a</quotes>, 1], [4, 2], [[1, 2], 1]]
-------------------------------

Syntax

Distrib(L:LIST):LIST

Count

   <type>list</type>