Simplification of consecutive `map`s
The expression

and . map ($ x) . map ($ y) . map ($ z) . map test $ ps


contains several map calls connected with .. But since map f . map g === map (f . g), we can simplify it as

and . map (($ x) . ($ y) . ($ z) . test) $ ps


or more concisely

and . map (\g -&gt; test g x y z) $ ps


Also and . map p can be simplified by all, so finally we get

all (\g -&gt; test g x y z) ps


Just one more note, please post code that compiles, especially for CR, it's much easier to work with; see http://sscce.org/