[Haskell-cafe] foldr (.) id
Ross Paterson
ross at soi.city.ac.uk
Sat Oct 27 12:09:16 CEST 2012
On Fri, Oct 26, 2012 at 07:41:18PM +0100, Greg Fitzgerald wrote:
> I've recently found myself using the expression: "foldr (.) id" to
> compose a list (or Foldable) of functions. It's especially useful
> when I need to map a function over the list before composing. Does
> this function, or the more general "foldr fmap id", defined in a
> library anywhere? I googled and hoogled, but no luck so far.
Alternatively: flip (foldr id)
More information about the Haskell-Cafe
mailing list