fork download
  1. isPrime n
  2. | n >= 2 = null [ x | x <- [2..root], n `mod` x == 0 ]
  3. | otherwise = error "Wut?"
  4. where root = ceiling $ sqrt $ fromIntegral n
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty