Proposal: Add Compositor class as superclass of Arrow

apfelmus apfelmus at quantentunnel.de
Mon Oct 22 16:02:47 EDT 2007


Conal Elliott wrote:
> I like the simplicity of th Cartesian class, including definability of dup,
> swap, lAssoc, rAssoc, first, and second.
> 
> I'm missing the significance of
> 
>> But IIRC, (&&&) does impose an "order of side effects" on the arguments,
> so Arrows are more general (less restrictive) than cartesian categories.
> 
> Is it just that you're wondering with what class to associate the fst/&&&
> and snd/&&& laws?
> 
>     fst . (f &&& g) = f
>     snd . (f &&& g) = g

Exactly. They often don't hold for Arrows but are taken granted for 
Cartesian categories. So, using (&&&) as primitive is - despite its 
elegance - not the right thing to do. (That's also why Arrows have first 
and second as primitives even when (&&&) makes them superfluous.).

Regards,
apfelmus



More information about the Libraries mailing list