[Haskell-cafe] Re: Map list of functions over a single argument

Martin DeMello martindemello at gmail.com
Fri Feb 23 08:29:19 EST 2007


On 2/22/07, Gene A <yumagene at gmail.com> wrote:
>  The functions as I originally defined them are probably
> easier for someone new to Haskell to understand what was going on than the
> rather stark ($ a) in the final factoring of the function... Though the
> final resulting function is far the cleaner for that notation!

This is what I came up with when I was experimenting:

map (\f -> f $ a) fs

which then helped me to see it could be rewritten as just map ($ a) fs

martin


More information about the Haskell-Cafe mailing list