Skip to content

Instantly share code, notes, and snippets.

@jackmaney
Created September 26, 2013 17:57
Show Gist options
  • Save jackmaney/6718040 to your computer and use it in GitHub Desktop.
Save jackmaney/6718040 to your computer and use it in GitHub Desktop.
Prime number sieve as a single list comprehension
[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