Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Generates the constant, conceptally infinite, list of prime-numbers, using Turner's Sieve; http://www.haskell.org/haskellwiki/Prime_numbers#Turner.27s_sieve_-_Trial_division.
- turnersSieve :: Integral prime => [prime]
Functions
turnersSieve :: Integral prime => [prime] Source #
- For each prime, the infinite list of candidates greater than its square, is filtered for indivisibility; http://www.haskell.org/haskellwiki/Prime_numbers#Turner.27s_sieve_-_Trial_division.
- CAVEAT: though one can easily add a
PrimeWheel
, it proved counterproductive.