I wrote a function that applies a list of functions to an item.
applyAll :: [a -> b] -> a -> [b] applyAll [] _ = [] applyAll (f:fs) x = (f x) : (a
You could use:
applyAll l v = fmap ($ v) l
fmap lifts a function over the input list (actually any Functor). $ has type (a -> b) -> a -> b so it applies a function to a given value. ($ v) is a section which applies the given function to v.
fmap
$
(a -> b) -> a -> b
($ v)
v