Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am shewu on github.
  • I am wu (https://keybase.io/wu) on keybase.
  • I have a public key whose fingerprint is 5E1A 819C FD1A 74EE 6DF6 9685 9ED8 59AB 86FC 32E6

To claim this, I am signing this object:

(defn isPrime?[x]
(loop [i 2 a 0]
(if (and (< a 1) (<= i (Math/sqrt x)))
(if (zero? (rem x i))
(recur (inc i) (inc a))
(recur (inc i) a))
(if (zero? a)
true
false))))