Anonymous user
Primality by trial division: Difference between revisions
→{{header|Clojure}}
(→{{header|Sidef}}: added an alternative version, which excludes multiples of 2 and 3) |
|||
Line 657:
(odd? x)
(not-any? (partial divides? x)
(range 3 (
Testing only prime divisors:
Line 670:
(< 1 x)
(not-any? (partial divides? x)
(take-while (partial >= (
</lang>
|