In the introductory Haskell text, Learn You a Haskell for Great Good, the author defines a function, applyTwice, that two times applies a function f to a parameter x to illustrate the higher order capabilities central to the functional paradigm.
applyTwice :: (a -> a) -> a -> a
applyTwice f x = f (f x)
To this point, I found Haskell's type declarations clear, but this particular example confuses me. I think this is an opportunity to better understand type declarations.
The author indicates this construct "indicates that the first parameter is a function that takes something and returns that same thing. The second parameter is something of that type also and the return value is also of the same type." (text)
What does this type declaration mean? Why not use (a -> a) -> a, with each -> indicating a transformation of some sort?