I need to verify the type for the lambda expression: $\lambda f.\lambda x.f (f x)$
My method gives me: $(a\rightarrow c)\rightarrow b\rightarrow c$
Im trying to define it in Haskell (on Hugs) like this:
h= \f x -> f (f x)
When i call the :type comamnd it gives me:
(a -> a) -> a -> a
Is mi function correctly defined in Haskell?, or my method gives me a wrong result?