Created
July 2, 2015 23:05
-
-
Save tetsu-miyagawa/ed17f33f7f0db27906c2 to your computer and use it in GitHub Desktop.
SICP Exercise 1.22 odd-sequence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (odd-sequence min max) | |
(cond ((even? min) (odd-sequence (+ 1 min) max)) | |
((> min max) '()) | |
(else (cons min (odd-sequence (+ 2 min) max))))) | |
(define (search-for-primes min max) | |
(map timed-prime-test (odd-sequence min max)) | |
(newline)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment