chickadee » srfi-196 » range-ref

range-ref range nprocedure

Returns the nth element of range. It is an error if n is less than 0 or greater than or equal to the length of range. The running time of this procedure is asymptotically equal to the average accessing time of range.

Examples:

(range-ref (numeric-range 10 30) 5) ⇒ 15
(range-ref (range 2 (lambda (i) (not (zero? i)))) 1) ⇒ #t