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

11 The Built-In Classes

Collections

This section describes collections, Dylans aggregate data structures.

An overview of collections is given in Chapter 8, "Collections."

Collections

<collection> [Open Abstract Class]


The class of collections, aggregate data structures.

Superclasses:
<object>

Init-keywords:
None.

Description:
The class of collections.

<collection> is the root class of the collection class hierarchy. It provides a set of basic operations on all collections.

The element type of <collection> is indefinite < <object>.

Operations:
The class <collection> provides the following operations:
Functions on <collection> (continued)
Function DescriptionPage
do Iterates over one or more collections for side effect.313
map Iterates over one or more collections and collects the results in a freshly allocated collection.314
map-as Iterates over one or more collections and collects the results in a freshly allocated collection of a specified type.314
map-into Iterates over one or more collections and collects the results in an existing mutable collection.315
any? Returns the first true value obtained by iterating over one or more collections.316
every? Returns true if a predicate returns true when applied to all corresponding elements of a set of collections.317
Generic Functions on <collection> (continued)
Function DescriptionPage
element Returns the collection element associated with a particular key.284
key-sequence Returns a sequence containing the keys of its collection argument.284
reduce Combines the elements of a collection and a seed value into a single value by repeatedly applying a binary function.318
reduce1 Combines the elements of a collection into a single value by repeatedly applying a binary function, using the first element of the collection as the seed value.319
member? Returns true if a collection contains a particular value.320
find-key Returns the key in a collection such that the corresponding collection element satisfies a predicate.321
key-test Returns the function used by its collection argument to compare keys.283
forward-iteration-protocol Returns a group of functions used to iterate over the elements of a collection.324
backward-iteration-protocol Returns a group of functions used to iterate over the elements of a collection in reverse order.326
Methods on <collection> (continued)
Function DescriptionPage
= Compares two objects for equality.254
empty? Returns true if its argument is empty.279
size Returns the size of its argument.279
shallow-copy Returns a copy of its argument.277
Methods on singleton(<collection>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Explicit Key Collections

<explicit-key-collection> [Open Abstract Class]


The class of all collections that are not sequences.

Superclasses:
<collection>

Init-keywords:
None.

Description:
The class of all collections that are not sequences.

This class is disjoint from <sequence> because key-test is inert over the domain <sequence>.

The element type of <explicit-key-collection> is indefinite < <object>.

Operations:
The class <explicit-key-collection> provides the following operations:
Methods on singleton(<explicit-key-collection>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Sequences

<sequence> [Open Abstract Class]


The class of collections whose keys are consecutive integers starting from zero.

Superclasses:
<collection>

Init-keywords:
None.

Description:
The class of collections whose keys are consecutive integers starting from zero.

Sequences must be stable under iteration, and the iteration order must match the order of keys. Thus, the key associated with a sequence's iteration state can be determined by keeping a counter in parallel with the iteration state.

The default methods for add, add-new, remove, choose, choose-by, intersection, union, remove-duplicates, copy-sequence, concatenate, reverse, and sort all return new sequences that are instances of the type-for-copy of their primary sequence argument. However, more specialized methods are permitted to choose a more appropriate result class; for example, copy-sequence of a range returns another range, even though the type-for-copy value of a range is the <list> class.

<sequence> is disjoint from <explicit-key-collection> because of the inert domain over the function key-test for <sequence>.

The element type of <sequence> is indefinite < <object>.

Operations:
The class <sequence> provides the following operations:
Functions on <sequence> (continued)
Function DescriptionPage
concatenate Returns the concatenation of one or more sequences in a sequence of a type determined by the type-for-copy of its first argument.309
concatenate-as Returns the concatenation of one or more sequences in a sequence of a specified type.310
first Returns the first element of a sequence.288
second Returns the second element of a sequence.288
third Returns the third element of a sequence.289
Generic Functions on <sequence> (continued)
Function Page
addAdds an element to a sequence.294
add!Adds an element to a sequence.295
add-newAdds a new element to a sequence.296
add-new!Adds a new element to a sequence.297
removeRemoves an element from a sequence.298
remove!Removes an element from a sequence.298
chooseReturns those elements of a sequence that satisfy a predicate.319
choose-byReturns those elements of a sequence that correspond to those in another sequence that satisfy a predicate.320
intersectionReturns the intersection of two sequences.305
unionReturns the union of two sequences.306
remove-duplicatesReturns a sequence without duplicates.307
remove-duplicates!Returns a sequence without duplicates.308
copy-sequenceReturns a freshly allocated copy of some subsequence of a sequence.309
replace-subsequence!Replaces a portion of a sequence with the elements of another sequence.311
reverseReturns a sequence with elements in the reverse order of its argument sequence.301
reverse!Returns a sequence with elements in the reverse order of its argument sequence.302
sortReturns a sequence containing the elements of its argument sequence, sorted.303
sort!Returns a sequence containing the elements of its argument sequence, sorted.304
lastReturns the last element of a sequence.291
subsequence-positionReturns the position where a pattern appears in a sequence.312
Methods on <sequence> (continued)
Function DescriptionPage
= Compares two objects for equality.254
key-test Returns the function used by its collection argument to compare keys.283
Methods on singleton(<sequence>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Mutable Collections

<mutable-collection> [Open Abstract Class]


The class of collections that may be modified.

Superclasses:
<collection>

Init-keywords:
None.

Description:
The class of collections that may be modified.

Every mutable collection is required to allow modification by implementing element-setter.

The element type of <mutable-collection> is indefinite < <object>.

Operations:
The class <mutable-collection> provides the following operations:
Functions on <mutable-collection> (continued)
Function DescriptionPage
map-into Iterates over one or more collections and collects the results in an existing mutable collection.315
Generic Functions on <mutable-collection> (continued)
Function DescriptionPage
last-setter Sets the last element of a mutable sequence.291
Methods on <mutable-collection> (continued)
Function DescriptionPage
type-for-copy Returns an appropriate type for creating mutable copies of its argument.277
Methods on singleton(<mutable-collection>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

<mutable-explicit-key-collection> [Open Abstract Class]


The class of explicit-key-collections that can have elements replaced.

Superclasses:
<explicit-key-collection> <mutable-collection>

Init-keywords:
None.

Description:
The class of explicit-key-collections that can have elements replaced.

The element type of <mutable-explicit-key-collection> is indefinite < <object>.

Operations:
The class <mutable-explicit-key-collection> provides the following operations:
Methods on singleton(<mutable-explicit-key-collection>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

<mutable-sequence> [Open Abstract Class]


The class of sequences that may be modified.

Superclasses:
<sequence> <mutable-collection>

Init-keywords:
None.

Description:
The class of sequences that may be modified.

The element type of <mutable-sequence> is indefinite < <object>.

Operations:
The following operations are provided on <mutable-sequence>:
Generic Functions on <mutable-sequence> (continued)
Function DescriptionPage
first-setter Sets the first element of a mutable sequence.289
second-setter Sets the second element of a mutable sequence.290
third-setter Sets the third element of a mutable sequence.290
Methods on <mutable-sequence> (continued)
Function DescriptionPage
first-setter Sets the first element of a mutable sequence.289
second-setter Sets the second element of a mutable sequence.290
third-setter Sets the third element of a mutable sequence.290
Methods on singleton(<mutable-sequence>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Stretchy Collections

<stretchy-collection> [Open Abstract Class]


The class of collections that may grow or shrink to accomodate adding or removing elements.

Superclasses:
<collection>

Init-keywords:
None.

Description:
The class of collections that may grow or shrink to accomodate adding or removing elements.

Stretchy collections allow element-setter to be called with a key that is not present in the collection, expanding the collection as necessary to add a new element in that case. Each concrete subclass of <stretchy-collection> must provide or inherit a method for element-setter that behaves as follows when there is not already an element present for the indicated key:

Operations:
The following operations are provided on <stretchy-collection>:
Methods on singleton(<stretchy-collection>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Arrays

<array> [Open Abstract Instantiable Class]


The class of sequences whose elements are arranged according to a Cartesian coordinate system.

Superclasses:
<mutable-sequence>

Init-keywords:
The make method on singleton(<array>) accepts the following keyword arguments. Note that these are not inherited by subclasses of <array>.

dimensions:
An instance of <sequence> with elements that are instances of <integer>. This argument specifies the dimensions of the array. The size of the sequence specifies the rank (number of dimensions) of the array, and each integer in the sequence specifies the size of a dimension. This argument is required.

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

Description:
The class of collections whose elements are arranged according to a Cartesian coordinate system.

An array element is referred to by a (possibly empty) series of indices. The length of the series must equal the rank of the array. Each index must be a non-negative integer less than the corresponding dimension. An array element may alternatively be referred to by an integer, which is interpreted as a row-major index.

Arrays typically use space efficient representations, and the average time required to access a randomly chosen element is typically sublinear to the number of elements.

Whe a multi-dimensional array is created, the concrete class that is actually instantiated cannot be any of the specified subclasses of <array>, which are all one-dimensional. Every implementation must have one or more concrete subclasses of <array> that are used for this purpose. These concrete subclasses have no specified names, and their names are not exported by the Dylan module.

When a single-dimensional array is created, the array created will be an instance of <vector>.

Each concrete subclass of <array> must either provide or inherit implementations of the functions element, element-setter, and dimensions.

The element type of <array> is indefinite < <object>.

Operations:
The class <array> provides the following operations:
Generic Functions on <array> (continued)
Function DescriptionPage
rank Returns the number of dimensions of an array.281
row-major-index Returns the row-major-index position of an array element.282
aref Returns the array element indicated by a set of indices.287
aref-setter Sets the array element indicated by a set of indices.287
dimensions Returns the dimensions of an array.282
dimension Returns the size of a specified dimension of an array.283
Methods on <array> (continued)
Function DescriptionPage
size Returns the size of its argument.279
rank Returns the number of dimensions of an array.281
row-major-index Returns the row-major-index position of an array element.282
aref Returns the array element indicated by a set of indices.287
aref-setter Sets the array element indicated by a set of indices.287
dimension Returns the size of a specified dimension of an array.283
:
Methods on singleton(<array>) (continued)
Function DescriptionPage
make Returns a general instance of its first argument.244
limited Returns a limited subtype of a class.249

Vectors

<vector> [Open Abstract Instantiable Class]


The class of arrays of rank one (i.e. exactly one dimension).

Superclasses:
<array>

Init-keywords:
The make method on singleton(<vector>) accepts the following keyword arguments. Note that these are not inherited by subclasses of <vector>.

size:
An instance of <integer> specifying the size of the vector.

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

Description:
The class of one-dimensional arrays.

<vector> has no direct instances; calling make on <vector> returns an instance of <simple-object-vector>.

Each concrete subclass of <vector> must either provide or inherit an implementation of size that shadows the method provided by <array>.

The element type of <vector> is indefinite < <object>.

Operations:
The class <vector> provides the following operations:
Constructors for <vector> (continued)
Function DescriptionPage
vector Creates and returns a freshly allocated vector.252
Methods on <vector> (continued)
Function DescriptionPage
dimensions Returns the dimensions of an array.282
element Returns the collection element associated with a particular key.284
Methods on singleton(<vector>) (continued)
Function DescriptionPage
make Returns a general instance of its first argument.244
limited Returns a limited subtype of a class.249

<simple-vector> [Sealed Abstract Instantiable Class]


A predefined subclass of <vector> which provides an efficient implementation of fixed-length vectors.

Superclasses:
<vector>

Init-keywords:
The make method on singleton(<simple-vector>) accepts the following keyword arguments. Note that these are not inherited by subclasses of <simple-vector>.

size:
An instance of <integer> specifying the size of the vector.

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

Description:
The class of simple and efficient vectors.

The class <simple-vector> provides a constant time implementation for the element and element-setter functions. This property is shared by all subtypes of <simple-vector>.

Calling make on a <simple-vector> returns an instance of <simple-object-vector>. The size of a simple vector cannot be changed after the simple vector has been created.

Vector literals (created with the #[...] syntax) are general instances of <simple-vector>.

The element type of <simple-vector> is indefinite < <object>.

The class <simple-object-vector> and the type limited(<simple-vector>, of: <object>) have exactly the same instances, but neither is a subtype of the other. The relationship between them is simply that the make method for the type returns an instance of the class.

Operations:
The class <simple-vector> provides the following operations:
Methods on <simple-vector> (continued)
Function DescriptionPage
element Returns the collection element associated with a particular key.284
element-setter Sets the collection element associated with a particular key.285
Methods on singleton(<simple-vector>) (continued)
Function DescriptionPage
make Returns a general instance of its first argument.244
limited Returns a limited subtype of a class.249

<simple-object-vector> [Sealed Instantiable Class]


The class of simple vectors that may have elements of any type.

Superclasses:
<simple-vector>

Init-keywords:
The class <simple-object-vector> supports the following init-keywords:

size:
An instance of <integer> specifying the size of the vector. The default value is 0.

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

Description:
The class <simple-object-vector> represents vectors that may have elements of any type. It provides a constant time implementation for the element and element-setter functions.

The element type of <simple-object-vector> is <object>.

Operations:
None.

<stretchy-vector> [Open Abstract Instantiable Primary Class]


The class of vectors that are stretchy.

Superclasses:
<vector> <stretchy-collection>

Init-keywords:
The class <stretchy-vector> supports the the following init-keywords:

size:
An instance of <integer> specifying the initial size of the stretchy vector. The default value is 0.

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

Description:
The class of vectors that are stretchy.

Because <stretchy-vector> is abstract and instantiable but has no specified subclasses, every implementation must provide one or more concrete subclass to instantiate. These concrete subclasses have no specified names, and their names are not exported by the Dylan module.

The element type of <simple-vector> is indefinite < <object>.

Operations:
The class <stretchy-vector> provides the following operations:
Methods on <stretchy-vector> (continued)
Function DescriptionPage
add! Adds an element to a sequence.294
remove! Removes an element from a sequence.298
Methods on singleton(<stretchy-vector>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Deques

<deque> [Open Abstract Instantiable Primary Class]


The class of double-ended queues.

Superclasses:
<mutable-sequence> <stretchy-collection>

Init-keywords:
The class <deque> supports the following init-keywords:

size:
An instance of <integer> specifying the initial size of the deque. The default value is 0.

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

Description:
A subclass of sequence that supports efficient forward and backward iteration, and efficient addition and removal of elements from the beginning or end of the sequence.

Because <deque> is abstract and instantiable but has no specified subclasses, every implementation must provide one or more concrete subclass to instantiate. These concrete subclasses have no specified names, and their names are not exported by the Dylan module.

The element type of <deque> is indefinite < <object>.

Operations:
The class <deque> provides the following operations:
Generic Functions on <deque> (continued)
Function DescriptionPage
push Adds an element to the front of a deque.300
pop Removes and returns the first element of a deque.300
push-last Adds an element to the end of a deque.300
pop-last Removes and returns an element from the end of a deque.301
Methods on <deque> (continued)
Function DescriptionPage
add! Adds an element to a sequence.294
remove! Removes an element from a sequence.298
Methods on singleton(<deque>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

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 in 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 a sequence. At the implementation's option, 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.

<list> [Sealed Instantiable Abstract Class]


The class of linked lists.

Superclasses:
<mutable-sequence>

Init-keywords:
The make method on singleton(<list>) accepts the following keyword arguments. Note that these are not inherited by subclasses of <list>.

size:
An instance of <integer> specifying the size of the list. The default value is 0.

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

Description:
The class of linked lists.

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.

The element type of <list> is <object>.

Operations:
The class <list> provides the following operations:
Constructors for <list> (continued)
Function DescriptionPage
list Creates and returns a freshly allocated list.247
pair Creates and returns a freshly allocated pair.247
Functions on <list> (continued)
Function DescriptionPage
head Returns the head of a list.292
tail Returns the tail of a list.292
Methods on <list> (continued)
Function DescriptionPage
size Returns the size of its argument.279
= Compares two objects for equality.254
add! Adds an element to a sequence.294
remove! Removes an element from a sequence.298
Methods on singleton(<list>) (continued)
Function DescriptionPage
make Returns a general instance of its first argument.244

<pair> [Sealed Instantiable Class]


The class of lists that can have new values assigned to their heads and tails.

Superclasses:
<list>

Init-keywords:
None.

Description:
The class of lists that can have new values assigned to their heads and tails.

The element type of <pair> is <object>.

Operations:
Functions on <pair> (continued)
Function DescriptionPage
head-setter Sets the head of a pair.293
tail-setter Sets the tail of a pair.293
The following operations are provided on <pair>:
Constructors for <pair> (continued)
Function DescriptionPage
pair Creates and returns a freshly allocated pair.247

<empty-list> [Sealed Instantiable Class]


The class with only one instance, the empty list.

Superclasses:
<list>

Init-keywords:
None.

Description:
The class <empty-list> has only one instance, the empty list. The empty list is a direct instance of <empty-list> and an indirect instance of <list>. Note that <empty-list> is not == to singleton (#()).

The element type of <empty-list> is <object>.

Operations:
None.

Ranges

<range> [Open Abstract Instantiable Primary Class]


The class of arithmetic sequences.

Superclasses:
<sequence>

Init-keywords:
The class <range> supports the the following init-keywords:

from:
An instance of <real> specifying the first value in the range. The default value is 0.

by:
An instance of <real> specifying the step between consecutive elements of the range. The default value is 1.

to:
An instance of <real> specifying an inclusive bound for the range. If by: is positive, the range will include numbers up to and including this value. If by: is negative, the range will include numbers down to to and including this value.
to: cannot be specified with above: or below:.

above:
An instance of <real> specifying an exclusive lower bound for the range. The range will only include numbers above this value, regardless of the sign of by:.
above: cannot be specified with to: or below:.

below:
An instance of <real> specifying an exclusive upper bound for the range. The range will only include numbers below this value, regardless of the sign of by:.
below: cannot be specified with to: or above:.

size:
An instance of <integer> specifying the size of the range.

Description:
The class <range> is used for creating sequences of numbers. Ranges may be infinite in size, and may run from higher numbers to lower numbers.

Because <range> in abstract and instantiable but has no specified subclasses, every implementation must provide one or more concrete subclass to instantiate. These concrete subclasses have no specified names, and their names are not exported by the Dylan module.

The element type of <range> is indefinite < <real>.

Operations:
The class <range> provides the following operations:
Methods on <range> (continued)
Function DescriptionPage
member? Returns true if a collection contains a particular value.320
size Returns the size of its argument.279
copy-sequence Returns a freshly allocated copy of some subsequence of a sequence.309
= Compares two objects for equality.254
reverse Returns a sequence with elements in the reverse order of its argument sequence.301
reverse! Returns a sequence with elements in the reverse order of its argument sequence.301
intersection Returns the intersection of two sequences.305
type-for-copy Returns an appropriate type for creating mutable copies of its argument.277
Methods on singleton(<range>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

Strings

<string> [Open Abstract Instantiable Class]


The class of sequences with elements that are characters.

Superclasses:
<mutable-sequence>

Init-keywords:
The class <string> supports the following init-keywords:

size:
An instance of <integer> specifying the size of the string. The default value is 0.

fill:
An instance of <character> specifying the initial value for each element. The default value is ' ' (space).

Description:
The class <string> is used for holding sequences of characters.

<string> has no direct instances; calling make on <string> will return an instance of a concrete subclass of <string>.

The element type of <string> is indefinite < <character>.

Operations:
The class <string> provides the following operations:
Methods on <string> (continued)
Function DescriptionPage
< Returns true if its first operand is less than its second operand.256
as-lowercase Coerces an object to lowercase.276
as-lowercase! Coerces an object to lowercase in place.276
as-uppercase Coerces an object to uppercase.275
as-uppercase! Coerces an object to uppercase in place.275
Methods on singleton(<string>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

<byte-string> [Sealed Instantiable Class]


The class of vectors with elements that are eight-bit characters.

Superclasses:
<string> <vector>

Init-keywords:
The class <byte-string> supports the following init-keywords:

size:
An instance of <integer> specifying the size of the byte string. The default value is 0.

fill:
An instance of <character> specifying the initial value for each element. The default value is ' ' (space).

Description:
The class <byte-string> represents strings with elements that are eight bit characters. It provides constant time element and element-setter methods.

The element type of <byte-string> is indefinite < K2 (where K2 is a subtype of <character>).

Operations:
The class <byte-string> provides the following operations:
Methods on <byte-string> (continued)
Function DescriptionPage
element Returns the collection element associated with a particular key.284
element-setter Sets the collection element associated with a particular key.285

<unicode-string> [Sealed Instantiable Class]


The class of vectors with elements that are sixteen-bit Unicode characters.

Superclasses:
<string> <vector>

Init-keywords:
The class <unicode-string> supports the following init-keywords:

size:
An instance of <integer> specifying the size of the unicode string. The default value is 0.

fill:
An instance of <character> specifying the initial value for each element. The default value is ' ' (space).

Description:
The class <unicode-string> represents strings with elements that are sixteen bit Unicode characters. It provides constant time element and element-setter methods.

The element type of <unicode-string> is indefinite < K1 (where K1 is a subtype of <character>).

Operations:
The class <unicode-string> provides the following operations:
Methods on <unicode-string> (continued)
Function DescriptionPage
element Returns the collection element associated with a particular key.284
element-setter Sets the collection element associated with a particular key.285

Tables

Also called a hash table, a table is an unordered mapping between arbitrary keys and elements. Tables are the only predefined collections that are unstable under iteration.

Tables are stretchy in that they allow the addition and removal of keys. <table> and its subclasses are the only predefined classes that are stretchy but are not stretchy sequences.

For a complete description of tables, see "Tables" on page 120.

<table> [Open Abstract Instantiable Primary Class]


The class of tables (also known as hash tables).

Superclasses:
<mutable-explicit-key-collection> <stretchy-collection>

Init-keywords:
The class <table> supports the following init-keyword:

size:
An instance of <integer>. If specified, this value provides a hint to the implementation as to the expected number of elements to be stored in the table, which might be used to control how much space to initially allocate for the table. The default value is unspecified.

Description:
The class <table> is the only predefined instantiable subclass of <explicit-key-collection>.

Every concrete subclass of <table> must provide or inherit a method for table-protocol. For details, see "Tables" on page 120.

<table> has no direct instances; calling make on <table> will return an instance of <object-table>.

The element type of <table> is indefinite < <object>.

Operations:
The class <table> provides the following operations:
Generic Functions on <table> (continued)
Function DescriptionPage
table-protocol Returns functions used to implement the iteration protocol for a tables.327
Methods on <table> (continued)
Function DescriptionPage
forward-iteration-protocol Returns a group of functions used to iterate over the elements of a collection.324
table-protocol Returns functions used to implement the iteration protocol for a tables.327
remove-key! Modifies an explicit key collection so it no longer has a particular key.322
element Returns the collection element associated with a particular key.284
element-setter Sets the collection element associated with a particular key.285
size Returns the size of its argument.279
key-test Returns the function used by its collection argument to compare keys.283
Methods on singleton(<table>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249

<object-table> [Open Abstract Instantiable Class]


The class of tables that compare keys using ==.

Superclasses:
<table>

Init-keywords:
None.

Description:
Calling make on <table> will return a general instance of <object-table>. Because <object-table> is abstract and instantiable but has no specified subclasses, every implementation must provide one or more concrete subclasses to instantiate. These concrete subclasses have no specified names, and their names are not exported by the Dylan module.

The element type of <object-table> is indefinite < <object>.

Operations:
The class <object-table> provides the following operations:
Methods on <object-table> (continued)
Function DescriptionPage
table-protocol Returns functions used to implement the iteration protocol for a tables.327
Methods on singleton(<object-table>) (continued)
Function DescriptionPage
limited Returns a limited subtype of a class.249


Dylan Reference Manual - 17 OCT 1995
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker