Exercise 9.4

applyEach :: [(a -> b)] -> a -> [b]
applyEach [] _ = []
applyEach (f:fs) x = f x : applyEach fs x

One Response to “Exercise 9.4”

  1. anonyoumous says:

    applyEach fs x = map (\f -> f x) fs
    or using ($)
    applyEach fs x = map ($ x) fs

Leave a Reply