Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (prime? n)
- (define (iter cur)
- (cond
- ((> cur (sqrt n)) #t)
- ((= (modulo n cur) 0) #f)
- (else (iter (+ cur 1)))))
- (if (< n 2)
- #f
- (iter 2)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement