Created
November 9, 2015 18:38
-
-
Save vlas-ilya/1ee52f0964dfb9e88c45 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
prime :: Int -> Int | |
prime n = last $ take n $ preparePrime [2, 3 ..] | |
where preparePrime (x:xs) = [x] ++ [y | y <- xs, y `mod` x /= 0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment