Created
September 26, 2013 17:57
-
-
Save jackmaney/6718040 to your computer and use it in GitHub Desktop.
Prime number sieve as a single list comprehension
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
[n | n <- [2..100], [m | m <- [2..n-1], n `mod` m == 0] == []] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment