
20 Feb
2007
20 Feb
'07
10:05 a.m.
Quoth Paul Moore, nevermore,
Prelude> map ($ 3) [(*2),(+1),div 1] [6,4,0]
Cool. I told you I was missing something! :-)
I suppose this would fit your original idea if you wanted that particular type signature. (Warning: not tested.)
f :: a -> [a -> b] -> [b] f c fs = map ($ c) fs
mapF :: [a -> b] -> a -> [b] mapF = flip f
Aren't higher order functions just dreamy... ? ;-) -- Dougal Stanton