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.
sealed
| class | An instance of <type>. |
| type | An instance of <type>. |
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>. |
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.
| class | An instance of singleton(<integer>). |
| min: | An instance of <integer>. |
| max: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <collection> type.
| class | An instance of singleton(<collection>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <explicit-key-collection> type.
| class | An instance of singleton(<explicit-key-collection>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <mutable-collection> type.
| class | An instance of singleton(<mutable-collection>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <stretchy-collection> type.
| class | An instance of singleton(<stretchy-collection>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <mutable-explicit-key-collection> type.
| class | An instance of singleton(<mutable-explicit-key-collection>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <sequence> type.
| class | An instance of singleton(<sequence>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns an uninstantiable limited <mutable-sequence> type.
| class | An instance of singleton(<mutable-sequence>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
This method returns a limited <object-table> type.
| class | An instance of singleton(<object-table>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
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).
| class | An instance of singleton(<array>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| dimensions: | An instance of <integer>. |
| type | An instance of <type>. |
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.
| class | An instance of singleton(<simple-vector>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
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.
| class | An instance of singleton(<stretchy-vector>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
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.
| class | An instance of singleton(<deque>). |
| of: | An instance of <type>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
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.
| class | An instance of singleton(<string>). |
| of: | An instance of <character>. |
| size: | An instance of <integer>. |
| type | An instance of <type>. |
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.
| class | An instance of singleton(<string>). |
| of: | An instance of <real>. |
| type | An instance of <type>. |