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

Paul Moore p.f.moore at gmail.com
Tue Feb 20 09:21:09 EST 2007

On 20/02/07, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
> p.f.moore:
> > I'm after a function, sort of equivalent to map, but rather than
> > mapping a function over a list of arguments, I want to map a list of
> > functions over the same argument. The signature would be [a -> b] -> a
> > -> [b], but hoogle didn't come up with anything.
> Prelude> map ($ 3) [(*2),(+1),div 1]
> [6,4,0]

Cool. I told you I was missing something! :-)

The more I learn about using higher order functions, the more impressed I get.


More information about the Haskell-Cafe mailing list