Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- primes :: Integral a => [a]
- primes = sieve [2..]
- where sieve (x:xs) = x : sieve [ y | y <- xs, rem y x /= 0 ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement