
On 14/09/05, Johannes Waldmann
Forgive me but the names mempty, mappend, runEndo look horrible. See http://www.haskell.org//pipermail/haskell/2005-August/016323.html -- -- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 -- ---- http://www.imn.htwk-leipzig.de/~waldmann/ -------
Well, I agree that appEndo is better, since it really is just wrapped function application. If you don't like the abbreviation, that would become applyEndofunction. I think it's reasonably obvious from the type what it does anyway. It ought to have a short name since infix application is likely. The names mempty and mappend are not too bad, even if they're a little unconventional. The analogy with the list monoid is clear enough. "unit" or "identity" and "times" or "multiply" would also work. I personally don't really see the need to change the names, they're reasonably descriptive, and it was obvious what they referred to the first time I saw them. By the way, Data.Set should perhaps be made an instance of Monoid in the obvious way. - Cale