[Haskell-cafe] adjunction of product and exponentiation

Jonathan Cast jonathanccast at fastmail.fm
Thu Aug 7 02:07:20 EDT 2008


On Wed, 2008-08-06 at 22:50 -0700, Jason Dusek wrote:
> Jonathan Cast <jonathanccast at fastmail.fm> wrote:
> > Jason Dusek wrote:
> > > It is an arrow that takes a C to an arrow that takes an A
> > > and makes the product C x A. I want to write curry(C x A)
> > > but that is ridiculous looking. What's the right notation
> > > for this thing?
> >
> > It's a curried pairing operator. Haskell calls it (,); it
> > might also be called pair. It is also, of course, equal to
> > curry(id), so if you write identity arrows as the
> > corresponding objects then curry(C x A) is perfectly
> > reasonable.
> 
>   Why is it equal to curry(id)?

curry f x y = f (x, y)

So therefore

  curry id x y
= id (x, y)
= (x, y)

Eta-contracting, we get

curry id = \ x. \ y. (x, y)

which is your function.

jcc




More information about the Haskell-Cafe mailing list