- range length indexerprocedure
Returns a range whose length (number of elements) is length. The indexer procedure returns the nth element (where 0 ≤ n < length) of the range, given n. This procedure runs in O(1) time. The range returned is compact, although indexer may close over arbitrarily large data structures. The average accessing time of the resulting range is the average time needed to run indexer.
Examples:
(range->list (range 26 (lambda (n) (integer->char (+ 65 n))))) ⇒ (#\A #\B #\C #\D #\E … #\Z) (range->list (range 10 (lambda (n) (expt 1/2 n)))) ⇒ (1 1/2 1/4 … 1/512)