applyEach :: [(a -> b)] -> a -> [b]
applyEach [] _ = []
applyEach (f:fs) x = f x : applyEach fs x |
applyEach :: [(a -> b)] -> a -> [b]
applyEach [] _ = []
applyEach (f:fs) x = f x : applyEach fs x
This entry was posted on Wednesday, August 8th, 2007 at 10:34 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
applyEach fs x = map (\f -> f x) fs
or using ($)
applyEach fs x = map ($ x) fs