[Haskell-beginners] help with types and composition

Edward Z. Yang ezyang at MIT.EDU
Mon Jul 6 10:30:05 EDT 2009


Excerpts from Dan Douglas's message of Mon Jul 06 09:30:46 -0400 2009:
> So, basically any function's type will always be in curryfied form, and the
> only time there's a tuple involved is if the function's argument is itself a
> tuple? I'll have to ponder a bit how nesting functions are equivalent to a
> function with multiple arguments.

The easiest way to think about this is to add parentheses around the
type declaration.

Int -> Int -> Int

becomes:

Int -> (Int -> Int)

Cheers,
Edward


More information about the Beginners mailing list