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

Twan van Laarhoven twanvl at gmail.com
Fri Nov 23 12:14:42 CET 2012


On 20/11/12 20:14, John Wiegley wrote:
> Fairly obvious, but strangely missing.
>
>      compose :: [(a -> a)] -> a -> a
>      compose = foldr (.) id

I have never used this function in a generic setting, but I do often use

     concatShows :: [ShowS] -> ShowS
     concatShows = foldr (.) id


Twan




More information about the Libraries mailing list