Sieve of Eratosthenes: Difference between revisions

Content added Content deleted
(Added FreeBASIC)
Line 1,636: Line 1,636:


=={{header|Clojure}}==
=={{header|Clojure}}==
"primes<" is a functional interpretation of the Sieve of Eratosthenes. It uses a transducer internally but can be written with "set" in place of "into {}" to make it even more terse.
''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>
<lang clojure>
(defn primes< [n]
(defn primes< [n]