j
k
j a
j l
applyEach [(+1), (+3), (+2)] 1 => [2,4,3] :: [Integer] ...applyEach' :: [a->b] -> a -> [b] applyEach' funs x = map applyx funs where applyx (fun) = fun x
applyEach [(+1), (+3), (+2)] 1 => [2,4,3] :: [Integer]
applyEach' :: [a->b] -> a -> [b] applyEach' funs x = map applyx funs where applyx (fun) = fun x
...or more simply: applyEach' l x = map ($x) l
Back to the thread
Back to the list