[Haskell-cafe] foldr (.) id

John Wiegley johnw at newartisans.com
Fri Oct 26 23:00:28 CEST 2012


>>>>> Thiago Negri <evohunz at gmail.com> writes:

> Can you please show some examples where it might be useful?
> I miss the point.

I guess if he already has a list of functions, Endo won't help.  Endo just
lets you treat functions as monoids, so you can foldMap, etc.  In that case,
foldr (.) id is pretty idiomatic, and Google turns up several uses of it.

John



More information about the Haskell-Cafe mailing list