[Haskell-cafe] Re: what is inverse of mzero and return?
Jules Bean
jules at jellybean.co.uk
Mon Jan 24 14:21:36 EST 2005
On 24 Jan 2005, at 18:18, Keean Schupke wrote:
> Ashley Yakeley wrote:
>
>>
>>
>> If you remember your category theory, you'll recall that two
>> morphisms are not necessarily the same just because they're between
>> the same two objects. For instance, the objects may be sets, and the
>> morphisms may be functions between sets: morphisms from A to B are
>> the same only if they map each element in A to the same element in B.
> Yes, but I though the 'objects' in this case are endofunctors from a
> type to itself... the the morphisms operate on these endofunctors, the
> morphisms are unit and join.... such that joining 'unit' to the
> endofuntor retults in the endofunctor.
>
> But I think that as the endofunctor is from the type to itself, the
> value does not
> come into it.
>
I've lost track of what you mean by 'this case' and indeed of what you
mean by 'join' (did you mean mplus? the word join is normally used for
the operation of type m (m a) -> m a, which is not often used directly
in haskell)
However, even addressing your point about endofunctors: for two
endofunctors to be equal, they must be equal on all objects and all
morphisms, which effectively means they must be pointwise equal on all
values.
Jules
More information about the Haskell-Cafe
mailing list