Maximum and Minimum monoids
Strake
strake888 at gmail.com
Sat Dec 29 00:52:45 CET 2012
On 28/12/2012, Strake <strake888 at gmail.com> wrote:
>> I also don't think it is a good idea to have direct Monoid instances for
>> Max and Min, because they behave weirdly on empty lists. Do you really
>> think that "minimum [] :: Int" should be defined?
>
> If we had the Bounded constraint, it wouldn't be.
Derp. Sorry, I was thinking Integer.
Well, it's bounded, so yes, it should be. Now we have an exception.
More information about the Libraries
mailing list