Next: , Previous: , Up: one-dimension   [Index]


33.2 Constructors

Function: %make-type-descriptor item? item=? item<? item<=? item-min item-max item-prev item-next item-minus item-copy

Build and return a new type descriptor.

Function: %make-range type start past
Function: %make-range type start last

Compose start and past/last into a range. This function validates the arguments to make sure the resulting range is valid.

Function: %range-copy type range

Return a clone of range.

Function: %make-domain type item/range ...

Build and return a new domain. The list of item/range may be the empty list or a mixed list of items and ranges. See %domain-add-item and %domain-add-range for details.

Function: %domain-copy type domain

Return a newly allocated domain holding a copy of domain.

Function: %domain-add-item type domain obj

Add the single value obj to domain, return the new domain. The returned domain may share some structure with domain. If obj does not satisfy the item? function of type: An assertion violation is raised.

obj is interpreted as lower limit of a range and the item-next function of type is used to generate the corresponding upper limit. If generating the next item fails: An assertion violation is raised.

Function: %domain-add-range type domain range

Add range to domain, return the new domain. The returned domain may share some structure with domain.

range is a pair of items; it is interpreted as double–closed range by (vicare containers one-dimension-cc) and as half–open range by (vicare containers one-dimensionc-co).