title: Dot Operator in Haskell: need more explanation
body: <p>I'm trying to understand what the dot operator is doing in this Haskell code:</p>
  
  <pre><code>sumEuler = sum . (map euler) . mkList
  </code></pre>
  
  <p>The entire source code is below. </p>
  
  <h2>My understanding</h2>
  
  <p>The dot operator is taking the two functions <code>sum</code> and the result of <code>map euler</code> and the result of <code>mkList</code> as the input. </p>
  
  <p>But, <code>sum</code> isn't a function it is the argument of the function, right? So what is going on here? </p>
  
  <p>Also, what is <code>(map euler)</code> doing? </p>
  
  <h2>Code</h2>
  
  <pre class="lang-hs prettyprint-override"><code>mkList :: Int -&gt; [Int]
  mkList n = [1..n-1]
  
  euler :: Int -&gt; Int
  euler n = length (filter (relprime n) (mkList n))
  
  sumEuler :: Int -&gt; Int
  sumEuler = sum . (map euler) . mkList
  </code></pre>