chickadee » srfi-121 » make-iota-generator

make-iota-generator count #!optional start stepprocedure

Creates a finite generator of a sequence of count numbers. The sequence begins with start (which defaults to 0) and increases by step (which defaults to 1). If both start and step are exact, it generates exact numbers; otherwise it generates inexact numbers. The exactness of count doesn't affect the exactness of the results.

(generator->list (make-iota-generator 3 8))
 ⇒ (8 9 10)

(generator->list (make-iota-generator 3 8 2))
 ⇒ (8 10 12)