[Haskell-cafe] Haskell's currying and partial application

Henning Thielemann lemming at henning-thielemann.de
Tue Jul 3 15:35:30 EDT 2007


On Tue, 3 Jul 2007, Peter Verswyvelen wrote:

> Let's see
>
> id :: a -> a
>
> curry :: ((a,b) -> c) -> a -> b -> c
>
> => curry id :: ((a,b) -> (a,b)) -> a -> b -> (a,b)
>
> So basically if
>
> f = curry id
>
> then
>
> f x y = (x,y)
>
> which means
>
> curry id = (,)
>
> something like this?

You got it!

> Do I win a price now? ;)

I hoped that nobody would care about the puzzle, thus I have not thought
about a price so far. :-]


More information about the Haskell-Cafe mailing list