john at repetae.net
Thu Oct 27 01:47:24 EDT 2005
On Wed, Oct 26, 2005 at 09:55:07PM -0700, Ashley Yakeley wrote:
> OK, so the last one's silly. But maybe Monoid should be a datatype
> rather than a class?
no reason we can't have both. I certainly would not want to see the
Monoid class go away, it is perhaps one of the most useful
abstractions... I would like to see it split up like
class HasEmpty a where
mempty :: a
class HasEmpty a => Monoid a where
mappend :: a -> a -> a
mconcat :: [a] -> a
perhaps if my class alias proposal takes off....
John Meacham - ⑆repetae.net⑆john⑈
More information about the Libraries