I want to create a pointfree function that takes a list of functions, applies a single argument to each listed function, and then compresses the list via another function. A pointfree version of this function would have the following type signature:
multiplex :: ([a] -> b) -> [(c -> a)] -> (c -> b)
And an example usage:
invariantsHold :: (Integral a) => a -> Bool
invariantsHold = multiplex (all id) [(>=0),(<=50),even]
I was able to write the following:
multiplex :: ([a] -> b) -> [(c -> a)] -> c -> b
multiplex f xs e = f $ map ((flip ($)) e) xs
This implementation is not pointfree, how can I transform this function to a pointfree representation?