Skip to content

Instantly share code, notes, and snippets.

@IrakliJani
Created January 17, 2015 18:50
Show Gist options
  • Save IrakliJani/c6827bd1f16555f17e4d to your computer and use it in GitHub Desktop.
Save IrakliJani/c6827bd1f16555f17e4d to your computer and use it in GitHub Desktop.
Haskell Code
factors n = [x | x <- [1..n], n `mod` x == 0]
prime n = factors n == [1, n]
primes n = [x | x <- [2..n], prime x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment