(import (scheme base) (scheme write)) (define (sum-internal acc i x) (define i-plus-one (+ i 1)) (if (< i x) (sum-internal (+ acc i-plus-one) i-plus-one x) acc ) ) (define (sum x) (sum-internal 0 0 x) ) (display (sum 40)) (newline) (display (sum 100)) (newline)