A collection in GAP consists of elements in the same family (see Families). The most important kinds of collections are homogeneous lists (see Lists) and domains (see Domains). Note that a list is never a domain, and a domain is never a list. A list is a collection if and only if it is homogeneous.
Basic operations for collections are Size (see Size)
and Enumerator (see Enumerator);
for finite collections, Enumerator admits to delegate the other
operations for collections
(see Attributes and Properties for Collections
and Operations for Collections)
to functions for lists (see Lists).
Obviously, special methods depending on the arguments are needed for
the computation of e.g. the intersection of two infinite domains.
IsCollection( obj ) C
tests whether an object is a collection.
Some of the functions for lists and collections have been described in the chapter about lists, mainly in Section Operations for Lists. In this chapter, we describe those functions for which the ``collection aspect'' seems to be more important than the ``list aspect''. As in Chapter Lists, an argument that is a list will be denoted by list, and an argument that is a collection will be denoted by C.
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual