Proposal: Max and Min for Monoid (ticket # 1952)

Conal Elliott conal at conal.net
Sun Dec 2 15:04:49 EST 2007


oops!  copy/paste/edit error.  thanks for catching.

On Dec 2, 2007 11:26 AM, Ian Lynagh <igloo at earth.li> wrote:

> On Sun, Dec 02, 2007 at 09:57:50AM -0800, Conal Elliott wrote:
> >
> > instance (Ord a, Bounded a) => Monoid (Min a) where
> >       mempty = Min minBound
>
> I think you mean:
>
>    mempty = Min maxBound
>
> >       Min a `mappend` Min b = Min (a `min` b)
>
>
> Thanks
> Ian
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20071202/d046b176/attachment-0001.htm


More information about the Libraries mailing list