Question : check if number is prime haskell
Answered by : grumpy-goat-p8mf1bvp2brm
isPrime k = length [ x | x <- [2..k], k `mod` x == 0] == 1
Source : https://stackoverflow.com/questions/4690762/determining-if-a-given-number-is-a-prime-in-haskell | Last Update : Mon, 03 May 21