[Haskell-cafe] List comparisons and permutation group code
Ross Paterson
ross at soi.city.ac.uk
Sat Oct 21 10:05:45 EDT 2006
On Sat, Oct 21, 2006 at 02:33:12PM +0100, David House wrote:
> Silly spin-offs are also common, leading to such wiki pages as
> http://haskell.org/haskellwiki/Compose. That particular example was
> mostly my doing and answers the question 'Can you build a function
> compose :: [a -> a] -> a -> a, such that a value will be fed into the
> top of the list and we'll get a result out of the bottom?'. Of course,
> the sane solution is foldl (flip (.)) id,
flip (foldl (flip id)) ?
I usually use the reverse composition, flip (foldr id).
More information about the Haskell-Cafe
mailing list