Code Review
Compare your solutions
#| BEGIN (Введите свое решение) |#
;; (define (timed-prime-test n)
;; (newline)
;; (display n)
;; (start-prime-test n (runtime)))
;; (define (start-prime-test n start-time)
;; (if (prime? n)
;; (report-prime (- (runtime) start-time))))
;; (define (report-prime elapsed-time)
;; (display " *** ")
;; (display elapsed-time))
(define (search-for-primes a b g)
(cond ((and (or (< a b) (= a b)) (even? a))
(search-for-primes (+ a 1) b g))
((or (< a b) (= a b))
(timed-prime-test a g)
(search-for-primes (+ a 1) b g))
))
(define (even? b) (= (remainder b 2) 0))
#| END |#