Created
January 17, 2015 18:50
-
-
Save IrakliJani/c6827bd1f16555f17e4d to your computer and use it in GitHub Desktop.
Haskell Code
This file contains hidden or 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
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