[Haskell-cafe] Monoid wants a (++) equivalent

John Meacham john at repetae.net
Tue Jun 30 21:31:26 EDT 2009


On Tue, Jun 30, 2009 at 08:02:48PM -0400, Daniel Peebles wrote:
> But we don't want to imply it's commutative either. Having something
> "bidirectional" like <> or <+> feels more commutative than associative
> to me.

Not really, think of '++', which doesn't commute but is visually
symmetric, or Data.Sequence.<>, or the common use of <> to mean
concatination in pretty printers. I think there is a fair amount of
precedence for using '<>' actually. As it appears when it is used, it
is also the natural mappend operator for the Monoid instance.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/


More information about the Haskell-Cafe mailing list