[Haskell-cafe] standard function
Maxime Henrion
mux at FreeBSD.org
Wed Jun 6 10:06:45 EDT 2007
Steffen Mazanek wrote:
> Hello,
>
> is there a function f::[a->b]->a->[b] in the libraries? Couldn't find one
> using
> hoogle although this seems to be quite a common thing...
As far as I know, there is no standard function doing that, though it is
easily implemented:
mapApply xs x = map ($ x) xs
or just:
mapApply x = map ($ x)
If you don't mind the parameters being reversed.
The 'mapApply' name is probably terrible, I'm sure other people would
have better suggestions for the naming :-).
Cheers,
Maxime
More information about the Haskell-Cafe
mailing list