The Prelude function map in Haskell applies a function to a list of inputs:
map :: (a -> b) -> [a] -> [b]
If we would like to apply an element to a list of functions, we could do this with recursion:
functionMap :: a -> [a -> b] -> [b]
functionMap element functions = case functions of
[] -> []
x:xs -> x element : functionMap element xs
How could we simplify the above recursion with higher order functions, such as foldl, foldr or map, if it is possible?