chickadee » srfi-196 » range-append

range-append range procedure

Returns a range whose elements are the elements of the ranges in order. This procedure runs in O(n) + O(k) time, where n is the total number of elements in all the ranges and k is the number of ranges. The result is usually expanded but may be compact. The average accessing time of the resulting range is asymptotically bounded by maximum of the average accessing times of the ranges.

Example:

(range->list (range-append (numeric-range 0 3)
                           (numeric-range 3 6)))
  ⇒ (0 1 2 3 4 5)