[Haskell-cafe] Monoid wants a (++) equivalent
lanny at cisco.com
Tue Jun 30 23:11:03 EDT 2009
Ok. When nobody can agree on a graphical operator can it be
shortened to "mop" and "munit"? (Personally I'm for (++). (Yeah, I
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.
> On Tue, Jun 30, 2009 at 6:39 PM, John Meacham<john at repetae.net> wrote:
>> On Tue, Jun 30, 2009 at 02:54:38PM -0400, Brent Yorgey wrote:
>>> On Tue, Jun 30, 2009 at 09:45:45AM -0700, Bryan O'Sullivan wrote:
>>>> I've thought for a while that it would be very nice indeed if the Monoid
>>>> class had a more concise operator for infix appending than "a `mappend` b".
>>>> I wonder if other people are of a similar opinion, and if so, whether this
>>>> is worth submitting a libraries@ proposal over.
>>> IIRC Jules Bean has proposed using (+>) for this purpose, which I
>>> like. Â It has the advantages of (a) not clashing with any other
>>> (common) operators, (b) making more obvious the fact that mappend is
>>> not necessarily commutative, and (c) providing the obvious (<+) for
>>> 'flip mappend' which is sometimes useful.
>> (+>) seems to imply to me that the operator is non-associative. Something
>> like (<>) or (<+>) would be better.
>> Â Â Â Â John
>> John Meacham - â‘†repetae.netâ‘†johnâ‘ˆ - http://notanumber.net/
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe