Test if a number an integer in haskell

isInt :: (RealFrac a) => a -> Bool
isInt x = x == fromInteger (round x)
Advertisements