## Operations on Ranges

range#keyfrom to above below by size=>range[Function]

Creates a range.from(default 0) is the first value in the range.by(default 1) is the step between consecutive elements of the range.to,aboveandbelow, constrain the range.tois an inclusive bound,aboveis an exclusive lower bound andbelowis an exclusive upper bound.aboveandbelowconstrain the range independent of the sign ofby.See<range>

member?val range#keytest=>boolean[G.F. Method]

Ifrangeis unbounded, this method is guaranteed to terminate iftestis==(the default).

sizerange=>size[G.F. Method]

For unbounded ranges,sizealways terminates and returns#f. For finite ranges,sizereturns an integer.

copy-sequencerange#keystart end=>new-range[G.F. Method]

When applied to a range,copy-sequencereturns another range, even though theclass-for-copyof a range is the<list>class.

range1=range2=>boolean[G.F. Method]

When called with two ranges,=always terminates, even if one or both ranges are unbounded in size.

reverserange=>new-range[G.F. Method]

Reversing a range produces another range. An unbounded range cannot be reversed.

reverse!range=>range[G.F. Method]

The result ofreverse!on a range is==to therangeargument. An unbounded range cannot be reversed.

intersectionrange1 range2#keytest=>range[G.F. Method]

Next section: Operations on Stretchy Vectorsintersectionapplied to two ranges and a test of==(the default) will produce another range as its result, even though theclass-for-copyof a range is not<range>. If eitherrange1orrange2is unbounded, this method is guaranteed to terminate only if thetestis==.