Advertisement
Guest User

Untitled

a guest
Jun 24th, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defn prime?
  2.   ([num] (prime? num 2 (/ num 2)))
  3.   ([num cur end]
  4.      (if (<= num 2) true)
  5.      (if (= cur end) true)
  6.      (if (= 0 (mod num cur))
  7.        false
  8.        (recur num (+ cur 1) end))
  9.      )
  10.   )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement