Hi,

Am Montag, den 08.12.2008, 15:59 -0600 schrieb Nathan Bloomfield:

> Slightly off topic, but the A^B notation for hom-sets also makes the
> natural isomorphism we call currying expressable as A^(BxC) = (A^B)^C.

So A^(B+C) = A^B × A^C ?

Oh, right, I guess that’s actually true:

uncurry either                :: (a -> c, b -> c)  -> (Either a b -> c)
(\f -> (f . Left, f . Right)) :: (Either a b -> c) -> (a -> c, b -> c)

It’s always nice to see that I havn’t learned the elementary power
calculation rules for nothing :-)

Greetings,
Joachim

PS:
For those who prefer Control.Arrow to points:
(.Left) &&& (.Right) :: (Either a b -> c) -> (a -> c, b -> c)
(found by trial and error :-))

-- 
Joachim "nomeata" Breitner
  mail: [EMAIL PROTECTED] | ICQ# 74513189 | GPG-Key: 4743206C
  JID: [EMAIL PROTECTED] | http://www.joachim-breitner.de/
  Debian Developer: [EMAIL PROTECTED]

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to