<list>

The class of linked lists.

Lists are constructed by linking together instances of <pair>.  The head of a list contains an element, and the tail of the list contains a pointer to the next pair on the list.  The list ends when the tail of a pair contains something besides another pair.

A proper list has a final pair with a tail containing the empty list.

An improper list does not have a final pair with a tail containing the empty list, either because the tail of its final pair is not the empty list, or because the list is circular and thus does not have a final pair.  Except when their behavior on improper lists is documented explicitly, collection or sequence functions are not guaranteed to return an answer when an improper list is used as a collection or sequence.  These functions may return the correct result, signal a <type-error>, or (in the case of a circular list) fail to return.

When treated as a collection, the elements of a list are the heads of successive pairs in the list.

The <list> class is partitioned into two concrete subclasses, <pair> and <empty-list>.  Calling make on <list> will return a linked list made from pairs and terminated with the empty list.

Exported from

Modifiers

abstract free sealed

Make keywords

size:An instance of <integer> specifying the size of the list.  The default value is 0.
fill:An instance of <object> specifying an initial value for each element of the list.  The default value is #f.

Superclasses

Subclasses

Functions on <list>

Functions returning <list>

The class of lists that can have new values assigned to their heads and tails.
The class of error conditions generated by type checks.
The class with only one instance, the empty list.
Returns a general instance of its first argument.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of integers.
The class of all Dylan objects.
The class of sequences that may be modified.
Rebuilds a list by applying a function over it.
In a list of lists, this function returns a list of the first elements of each of the lists.
Like do, except that it takes multiple argument lists.
This function is like foldl but works on sublists.
This function is like foldr but works on sublists.
A function.
A function.
In a list of lists, this function returns a list of the all but first elements of each of the lists.
Puts an element at the head of a list.
Creates and returns a freshly allocated list.
Creates a proper or improper list.
Takes a list and returns two lists: one that satisfies a predicate, and one that doesn’t.
Returns all the methods in a generic function that are applicable to sample arguments, sorted in order of specificity.
This function is dual to reduce; instead of taking some functions and a list and producing a value, it takes a value and some functions and produces a list.
This function is similar to unfold, except that it can also be used to build an improper list.