test.scm (239B)
1 (defn! checkDivisor (num div bound) 2 (if (< div bound) 3 (if (= 0 (% num div)) 4 false 5 (checkDivisor num (+ 1 div) bound)) 6 true)) 7 8 (defn! prime? (num) 9 (checkDivisor num 2 num)) ;; FIXME: check up to (sqrt num)
zahl | |
Log | Files | Refs | README |