I saw on a Haskell tutorial this function:
factorial :: (Integral a) => a -> a My question is why should I use that instead of this:
factorial :: Int->Int It's because with the first one we can use every type of numbers and in the second one we can only use an Int?
Integerat leastInteger). For instance,factorial 0.5won't work.