Jump to content

Sieve of Eratosthenes: Difference between revisions

m
(Added FreeBASIC)
Line 1,636:
 
=={{header|Clojure}}==
"''primes<"'' is a functional interpretation of the Sieve of Eratosthenes. It merely removes the set of composite numbers from the set of odd numbers (wheel of 2) leaving behind only prime numbers. It uses a transducer internally but can be written with "set" in place of "into {}" to make it even more terse.
<lang clojure>
(defn primes< [n]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.