chickadee » srfi-179 » make-interval

make-interval arg1 #!optional arg2procedure

Create a new interval. arg1 and arg2 (if given) are nonempty vectors (of the same length) of exact integers.

If arg2 is not given, then the entries of arg1 must be positive, and they are taken as the upper-bounds of the interval, and lower-bounds is set to a vector of the same length with exact zero entries.

If arg2 is given, then arg1 is taken to be lower-bounds and arg2 is taken to be upper-bounds, which must satisfy

 (< (vector-ref lower-bounds i) (vector-ref upper-bounds i))

for $0\leq i<{}$(vector-length lower-bounds). It is an error if lower-bounds and upper-bounds do not satisfy these conditions.