[Haskell-cafe] Help understanding a partial application

Levi Stephen levi.stephen at optusnet.com.au
Mon Aug 27 01:22:26 EDT 2007


Ryan Ingram wrote:
> Just expand out the function composition:
>     Dual . Endo . flip f = (\x -> Dual (Endo (flip f x)))
> which has the type d -> Dual (Endo c).
>  
>   -- ryan
> 

Aha.

I didn't get this straight away, but once I looked at the type signature for 
function composition, it became clear.

Thanks,
Levi


More information about the Haskell-Cafe mailing list