Created
July 5, 2014 13:44
-
-
Save ahmedissa/002ab1e12b19f7248216 to your computer and use it in GitHub Desktop.
Haskell Prime Numbers
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
primenumbers :: Integer -> [Integer] | |
primenumbers n = sieb [2..n] | |
where | |
sieb [] = [] | |
sieb (p:xs) = p: sieb [k | k<-xs, k `mod` p>0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment