Proposal for Max/Min Monoids Trac ticket 3036
David Menendez
dave at zednenem.com
Fri Feb 20 00:00:38 EST 2009
I like the Min/Max monoids, and the possibility of adding something
like AddBounds (although I'd prefer a name like "Bounded"; "Bounded
Integer" reads better than "AddBounds Integer").
One possible snag is that, so far as I know, there's no explicit
requirement that a type that instantiates Ord and Bounded should
satisfy the laws,
min maxBound a = a = min a maxBound
max minBound a = a = max a minBound
We're just assuming (reasonably) that instances will always work out
that way. (Although, I guess we're making the same assumption with Sum
and Prod.)
--
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
More information about the Libraries
mailing list