Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn prime?
- ([num] (prime? num 2 (/ num 2)))
- ([num cur end]
- (if (<= num 2) true)
- (if (= cur end) true)
- (if (= 0 (mod num cur))
- false
- (recur num (+ cur 1) end))
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement