limited

Returns a limited subtype of a class.  The available keyword arguments depend on the class.  Not all classes support limited; those that do are documented in the method descriptions below.

Note that an implementation is not required to implement limited as a generic function, and so the behavior embodied in the following method descriptions need not actually be implemented by separate methods.  The behavior is described as a set of methods for convenience of presentation only.

Exported from

Modifiers

sealed

Arguments

classAn instance of <type>.

Values

typeAn instance of <type>.
Summary
Returns a limited subtype of a class.
Returns a limited integer type, which is a subtype of <integer> whose instances are integers greater than or equal to min (if min: is specified) and less than or equal to max (if max: is specified).
This method returns an uninstantiable limited <collection> type.
This method returns an uninstantiable limited <explicit-key-collection> type.
This method returns an uninstantiable limited <mutable-collection> type.
This method returns an uninstantiable limited <stretchy-collection> type.
This method returns an uninstantiable limited <mutable-explicit-key-collection> type.
This method returns an uninstantiable limited <sequence> type.
This method returns an uninstantiable limited <mutable-sequence> type.
This method returns a limited <table> type.
This method returns a limited <object-table> type.
This method returns a type that supports dimensions: and fill: initialization keywords with the same behavior as <array>.
This method returns the same types as the method on singleton(<simple-vector>).
This method returns a type that supports size: and fill: initialization keywords with the same behavior as <simple-vector>.
This method returns a type that supports size: and fill: initialization keywords with the same behavior as <stretchy-vector>.
This method returns a type that supports size: and fill: initialization keywords with the same behavior as <deque>.
This method returns a type that supports size: and fill: initialization keywords with the same behavior as <string>.
This method returns a type that supports from:, to:, below:, above:, by:, and size: initialization keywords with the same behavior as <range>.

Functions

limited

Returns a limited integer type, which is a subtype of <integer> whose instances are integers greater than or equal to min (if min: is specified) and less than or equal to max (if max: is specified).  If no keyword arguments are specified, the result type is equivalent to <integer>.  Limited integer types are not instantiable.

Arguments

classAn instance of singleton(<integer>).
min:An instance of <integer>.
max:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <collection> type.

Arguments

classAn instance of singleton(<collection>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <explicit-key-collection> type.

Arguments

classAn instance of singleton(<explicit-key-collection>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <mutable-collection> type.

Arguments

classAn instance of singleton(<mutable-collection>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <stretchy-collection> type.

Arguments

classAn instance of singleton(<stretchy-collection>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <mutable-explicit-key-collection> type.

Arguments

classAn instance of singleton(<mutable-explicit-key-collection>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <sequence> type.

Arguments

classAn instance of singleton(<sequence>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns an uninstantiable limited <mutable-sequence> type.

Arguments

classAn instance of singleton(<mutable-sequence>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a limited <table> type.

Arguments

classAn instance of singleton(<table>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a limited <object-table> type.

Arguments

classAn instance of singleton(<object-table>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a type that supports dimensions: and fill: initialization keywords with the same behavior as <array>.  The default for fill is #f so if instance?(#f, of) is not true and the product of the dimensions is nonzero, the fill: initialization keyword is required because the default would cause a type error.

Instantiating type with a value of dimensions that has one element will return an instance of limited(<simple-vector>, of: of).

Arguments

classAn instance of singleton(<array>).
of:An instance of <type>.
size:An instance of <integer>.
dimensions:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns the same types as the method on singleton(<simple-vector>).

Arguments

classAn instance of singleton(<vector>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a type that supports size: and fill: initialization keywords with the same behavior as <simple-vector>.  The default for fill is #f so if instance?(#f, of) is not true and size is nonzero, the fill: initialization keyword is required because the default would cause a type error.

All general instances of <simple-vector> provide a constant time implementation of element and element-setter.

Arguments

classAn instance of singleton(<simple-vector>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a type that supports size: and fill: initialization keywords with the same behavior as <stretchy-vector>.  The default for fill is #f so if instance?(#f, of) is not true and size is nonzero, the fill: initialization keyword is required because the default would cause a type error.

Arguments

classAn instance of singleton(<stretchy-vector>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a type that supports size: and fill: initialization keywords with the same behavior as <deque>.  The default for fill is #f so if instance?(#f, of) is not true and size is nonzero, the fill: initialization keyword is required because the default would cause a type error.

Arguments

classAn instance of singleton(<deque>).
of:An instance of <type>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a type that supports size: and fill: initialization keywords with the same behavior as <string>.  The of argument must be a subtype of <character>.  The default for fill: is ‘ ‘ so if instance?(‘ ‘, of) is not true and size is nonzero, the fill: initialization keyword is required because the default would cause a type error.

There are no specified subtypes of <character>, except for unions of singletons, which makes this method rather useless for portable programs.  However, the method is provided because there might be useful subtypes of <character> in a particular implementation or in future versions of Dylan.

Arguments

classAn instance of singleton(<string>).
of:An instance of <character>.
size:An instance of <integer>.

Values

typeAn instance of <type>.

limited

This method returns a type that supports from:, to:, below:, above:, by:, and size: initialization keywords with the same behavior as <range>.  The of argument must be a subtype of <real>.  Make of this type signals a <type-error> if any element of the range is not an instance of of.

Arguments

classAn instance of singleton(<string>).
of:An instance of <real>.

Values

typeAn instance of <type>.
The class of integers.
The class of collections, aggregate data structures.
The class of all collections that are not sequences.
The class of collections that may be modified.
The class of collections that may grow or shrinking to accommodate adding or removing elements.
The class of explicit key collections that can have elements replaced.
The class of collections whose keys are consecutive integers starting from zero.
The class of sequences that may be modified.
The class of tables (also known as hash tables).
The class of tables that compare keys using ==.
The class of sequences whose elements are arranged according to a Cartesian coordinate system.
The class of simple and efficient vectors.
The class of vectors that are stretchy.
The class of double-ended queues.
The class of sequences with elements that are characters.
The class of arithmetic sequences.
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 all types, including classes and other types.
Returns the collection element associated with a particular key.
Sets the collection element associated with a particular key.
The class of characters.
The class of real numbers.
The class of error conditions generated by type checks.