Consider these (more or less) equivalent types of signatures:
f1 :: [a] -> Int -> a
f2 :: Integral b => [a] -> b -> a
f2 is more general than f1, and this is a big advantage, but is there any advantage of f1 over f2?
It seems that in solutions to the H-99 problems and in many published solutions to various Project Euler problems, the form f1 appears much more often than f2.
I'm not sure why. Is it just a programmer who is too lazy, or is there a cost of execution when switching to a more general version (f2), or is there another reason?
source
share