Adding swap/compose functions to Data.Tuple and Data.Function

Gershom Bazerman gershomb at
Tue Nov 20 21:33:17 CET 2012

On 11/20/12 3:09 PM, Dan Burton wrote:
>     It does seem that the idiom deserves a name, though, considering
>     how often I've come across it.
> The name for this is clearly mconcat, we just have to indicate 
> /which/ mconcat it is: the mconcat a la Endofunctors and Kleisli... 
> whatevers, respectively. It seems like this sort of thing should be 
> handled by the "newtype" package, but I can't seem to wrangle it into 
> submission.
 > ala Endo foldMap [(+1),(+1),(+2)] $ 3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list