1.14 List

List is a subpattern of the container pattern. It implements a double-chained list data structure. The list pattern is a little special, since many operations takes list positions as arguments instead of elements. The reason is, that the typical usage of lists are to manipulate the list itself (finding the element just before a given position in the list, etc.). This adds a little extra complexity to the operations of the list pattern, relative to the other container patterns.

Central to the understanding of the list pattern, is the understanding of the theCellType pattern. TheCellType is a virtual pattern, defined in container pattern (but it is a private attribute, except for the list subpattern). In the list pattern, theCellType contains the references to the successor and predecessor list positions, as well as the elm reference to the element object contained at this list position. TheCellType describes the list positions (also often called list elements).

List defines the following additional operations:

Container Libraries - Reference Manual
© 1992-2002 Mjølner Informatics
[Modified: Thursday October 19th 2000 at 12:51]