Skip to content

Instantly share code, notes, and snippets.

@crsaracco
Last active August 29, 2015 14:03
Show Gist options
  • Save crsaracco/888644aa4d4c4035b8c2 to your computer and use it in GitHub Desktop.
Save crsaracco/888644aa4d4c4035b8c2 to your computer and use it in GitHub Desktop.
Random Haskell code

List of Primes:

primes = sieve [2..]
    where sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment