title: Using map in Haskell
body: <p>I want to use <code>map</code> to substract the average of a list from each element of a list using <code>map</code>. So far I got this function for calculating the average:</p>
  
  <pre><code>averageOfList :: [Float] -&gt; Float
  averageOfList [] = 0
  averageOfList a = ((foldl (+) 0 a) / fromIntegral(length a))
  </code></pre>
  
  <p>The list is <code>[1.3,1.7,3.3,1.0,3.3]</code>. How exactly do I use the function for the average in <code>map</code> to subtract from each element?</p>