Skip to content

Instantly share code, notes, and snippets.

@srikumarks
Created September 20, 2010 18:55
Show Gist options
  • Save srikumarks/588433 to your computer and use it in GitHub Desktop.
Save srikumarks/588433 to your computer and use it in GitHub Desktop.
primes = sieve [2..]
where
sieve (p:ps) = p : (sieve [n | n <- ps, n `mod` p /= 0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment