Created
December 2, 2015 08:22
-
-
Save gilesbradshaw/121f7b5c109d3d762aa6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
primes :: [Int] | |
primes = sieve [2..] | |
sieve :: [Int] -> [Int] | |
sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /=0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment