Check Primality of a number in Haskell
Statement Define a function isPrime which accepts a number n, and returns True if n is prime and False otherwise. The easiest way to test the primality of a number is to test whether it has any factor. This is usally done by dividing the given number by the smallest prime number i.e. 2 first. …