I was thinking how I could make it so that if I have a list of elements [1, 2, ... n], and a list of filters such as [(>3), (<4), ...], it would return the list of elements that have passed every filter.
Been trying this for a while and what I got so far is:
filt :: (a -> Bool) -> [a] -> [a]
filt f xs = filter f xs
This function is supposed to get a filter and a list of elements and return the list of elements that have passed one single filter.
And then,
filters :: [a] -> ([a] -> Bool) -> [a]
filters xs ps = (\p -> filt p xs) ps
which not only gives me error, but I also don't know if I'm doing it correctly. (I'm trying to have each filter of the filter list be an argument for the filt function, along with the list of elements.
New to Haskell, so any tips and tricks you guys wanna give me are highly appreciated!