
-----------------------------------
wtd
Sun Apr 03, 2005 5:13 pm

Haskell Example: Sieve of Eratosthenes
-----------------------------------
The Wikipedia module Sieve where

sieve [] = []
sieve (x:xs) = x : sieve remaining
  where
    remaining = [y | y  input == [])
  (\(input@(x:xs), output) -> 
    if x ^ 2 > last input
      then ([], output ++ input)
      else ([y | y 