title: predicate and a list search haskell
body: <p>I am learning Haskell at the moment and have come to a bit of a standstill. I'm trying to write a function that takes a predicate <code>p</code> and a list <code>xs</code> and returns the list of those elements of <code>xs</code> which immediately follow an element which passes the predicate <code>p</code>. Here is what I have :</p>
  
  <pre><code>afterFilter :: (a -&gt; Bool) -&gt; [a] -&gt; [a]
  
  afterFilter x (y:ys) =
  
      if x y
  
          then (map head [ys])
  
      else
  
          afterFilter x (tail ys) 
  </code></pre>
  
  <p>test input : <code>afterFilter (&lt;0) [-4,7,-4,-8,3,-3,-6,0,-9,-1]</code></p>
  
  <p>output : <code>[7]</code></p>