;; Example 6.67

(define uptoby
  (lambda (low high step f)
    (if (<= low high)
        (begin
         (f low)
         (uptoby (+ low step) high step f))
      '())))

(let ((sum 0))
  (uptoby 1 100 2
          (lambda (i)
            (set! sum (+ sum i))))
  sum)

;; prints 2500
