Finding Local Maxima
You have redundant parentheses here: (y &gt; x &amp;&amp; y &gt; z). You can also make your type more generic: localMaxima :: Ord a =&gt; [a] -&gt; [a].

I think it looks a bit cleaner using an as-pattern and guard clauses. This way you don't need zs and can just write _.

localMaxima (x:rest@(y:z:_))
  | y &gt; x &amp;&amp; y &gt; z = y : localMaxima rest
  | otherwise      = localMaxima rest
localMaxima _ = []


In fact, if you know that y &gt; z then you don't need to check if z is a local maximum.