21 Lists

Lists are the most important way to treat objects together. A list arranges objects in a definite order. So each list implies a partial mapping from the integers to the elements of the list. I.e., there is a first element of a list, a second, a third, and so on. Lists can occur in mutable or immutable form, see Mutability and Copyability for the concept of mutability, and Duplication of Lists for the case of lists.

This chapter deals mainly with the aspect of lists in GAP as data structures. Chapter Collections tells more about the collection aspect of certain lists, and more about lists as arithmetic objects can be found in the chapters Row Vectors and Matrices.

Lists are used to implement ranges (see Ranges), sets (see Sorted Lists and Sets),indexSets strings (see Strings and Characters), row vectors (see Row Vectors), and matrices (see Matrices); Boolean lists (see Boolean Lists) are a further special kind of lists.

Several operations for lists, such as Intersection and Random, will be described in Chapter Collections, in particular see Lists and Collections.

Sections

  1. List Categories
  2. Basic Operations for Lists
  3. List Elements
  4. List Assignment
  5. IsBound and Unbind for Lists
  6. Identical Lists
  7. Duplication of Lists
  8. Membership Test for Lists
  9. Enlarging Internally Represented Lists
  10. Comparisons of Lists
  11. Arithmetic for Lists
  12. Finding Positions in Lists
  13. Properties and Attributes for Lists
  14. Sorting Lists
  15. Sorted Lists and Sets
  16. Operations for Lists
  17. Advanced List Manipulations
  18. Ranges
  19. Enumerators

[Top] [Previous] [Up] [Next] [Index]

GAP 4 manual
February 2000