[Haskell-cafe] function type def

Ketil Malde ketil at malde.org
Tue Apr 1 15:28:39 EDT 2008

PR Stanley <prstanley at ntlworld.com> writes:

> It's one of those things - I know sort of instinctively why it is so
> but can't think of the formal rationale for it:

> f g x = g (g x) :: (t -> t) -> (t -> t)

(t -> t) -> (t -> t)

   g :: t -> t 
   x :: t
   f :: (t -> t) -> t -> t

(The last parenthesis is not necessary, but implies that the type of
the partial application  f g  is a function t -> t .)

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list