Previous: one-dimension inspect, Up: one-dimension [Index]
Return a range representing the intersection of the argument ranges. It does not matter which range has start less than the other.
Intersection is a closed operation on the space of ranges: The
intersection of two ranges is a range (possibly empty). If the ranges
are not overlapping return #f
to represent the empty range.
Return two values representing the union of the argument ranges. It does not matter which range has start less than the other.
Union is not a closed operation on the space of ranges: The union of two contiguous or overlapping ranges is a single range, but the union of two disjoint ranges is the set holding the two argument ranges.
If the argument ranges are disjoint and non–contiguous: Return two
values being range-a and range-b. If the argument ranges
are contiguous or overlapping: Return two values being #f
and a
new range representing the union.
This function should be called like this:
(let-values (((head tail) (%range-union type r-a r-b))) (when head ---) (when tail ---))
Return two values representing the difference between the argument ranges; the difference is the set of elements present in one range and not in the other. It does not matter which range has start less than the other.
Difference is not a closed operation on the space of ranges: In
genreral the result is a couple of ranges. The first one represents
values which are all less than the values in the second one. Both the
returned values can be #f
.
This function should be called like this:
(let-values (((head tail) (%range-difference type r-a r-b))) (when head ---) (when tail ---))
Return two values representing the elements of range-a that are not in range-b.
This operation is not a closed operation on the space of
ranges: In genreral the result is a couple of ranges. The first one
represents values which are all less than the values in the second one.
Both the returned values can be #f
.
This function should be called like this:
(let-values (((head tail) (%range-in-first-only type r-a r-b))) (when head ---) (when tail ---))
Return a new domain representing the intersection of the arguments. The intersection is the set of values present in both the arguments.
The returned value may share some structure with the arguments.
Return a new domain representing the union of the arguments. The union is the set of values present in one and/or the other argument.
The returned value may share some structure with the arguments.
Return a new domain representing the difference of the arguments. The difference is the set of values present in one or the other argument.
The returned value may share some structure with the arguments.
Return a new domain representing the complement of domain in the space defined by domain-universe. The returned value holds all the items from domain-universe that are not in domain.
The returned value may share some structure with the arguments.
Apply proc to each value in the range.
Apply proc to each value in the range and return true if all the
return values are true. The application stops at the first #f
return value.
Apply proc to each value in the range and return true if at least one of the returned values is true. The application stops at the first true return value.
Fold kons over the values in the range.
Return a list holding all the elements in the range.
Apply proc to each element of domain.
Apply proc to each value in the domain and return true if all the
return values are true. The application stops at the first #f
return value.
Apply proc to each value in the domain and return true if at least one of the returned values is true. The application stops at the first true return value.
Fold kons over the values in the domain.
Return a list holding all the elements in the domain.
Concatenate the ranges and return the resulting range. It does not
matter which range has start less than the other. It makes sense to
apply this function to ranges that satisfy %range-contiguous?
.
The returned range may share some value with the original ranges.
Previous: one-dimension inspect, Up: one-dimension [Index]