Gee you are right, how embarrasing. I mistakenly read the signature of *** just above &&&, which is
(***) :: Arrow a ⇒ a b c → a b’ c’ → a (b,b’) (c,c’) Now just to me sure I get it right, *** results in an arrow that has two inputs (b,b') and two outputs (c,c')? > (&&&) :: Arrow (~>) => (b ~> c) -> (b ~> c') -> (b ~> (c, c')) Hey that’s a nice trick, and it is valid Haskell :) Peter -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Bertram Felgenhauer Sent: Wednesday, September 26, 2007 2:06 PM To: [email protected] Subject: Re: [Haskell-cafe] Troubles understanding memoization in SOE Peter Verswyvelen wrote: > Paul L wrote: > A minor detail in your paper: on page 7, you represent *(d) sf1 &&& sf2 *as > a big box taking one input and producing two outputs. The input is > internally split using a Y. This does not seem consistent with the other > boxes (e.g. *first *or *loop *internally) that show two arrows for an > incoming/outgoing pair, so I would say the outer box of &&& would also have > two inputs and two outputs. But look at the type of &&&: (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') or, perhaps more readable, (&&&) :: Arrow (~>) => (b ~> c) -> (b ~> c') -> (b ~> (c, c')) As you can see, the resulting arrow of type (b ~> (c, c')) really has only one input and produces a pair, i.e. two outputs. Internally it must duplicate the b input somehow and apply it to both input arrows, exactly as the box shows. Bertram _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
