title: How to apply a function to the parameter of another function?
body: <p>I have defined the following functions:</p>
  
  <pre><code>isOk :: Group -&gt; Bool
  //some condition
  
  filterGroup :: [Group] -&gt; [Group]
  filterGroup g = filter isOk g
  
  getGroupNb :: Group -&gt; NoGroupe
  getGroupNb (Group _ noGroupe _ _ _) = noGroupe
  
  nbGroup :: [Group] -&gt; [NoGroupe]
  nbGroup groupX = map getGroupNb groupX
  </code></pre>
  
  <p>I want to apply the function <code>filterGroup</code> to the <code>[Group]</code> that is passed as a parameter to the last function <code>nbGroup</code>. I would like something like that, for the last function: </p>
  
  <pre><code>nbGroup :: [Group] -&gt; [NoGroupe]
  nbGroup where [Group] = filterGroup[Group]
  nbGroup groupX = map getGroupNb groupX
  </code></pre>
  
  <p>How can I apply a function to a parameter of another function?</p>