number-interval.scm - The function number-interval-iter is an iterative, tail recursive variant of number-interval. | Lecture 3 - slide 21 : 42 Program 1 |
(define (number-interval-iter f t) (reverse (number-interval-iter-help f t '()))) (define (number-interval-iter-help f t res) (if (<= f t) (number-interval-iter-help (+ f 1) t (cons f res)) res))