title: Haskell's type system treats a numerical value as function?
body: <p>After playing around with haskell a bit I stumbled over this function:</p>
  
  <pre><code>Prelude Data.Maclaurin&gt; :t ((+) . ($) . (+))
  ((+) . ($) . (+)) :: (Num a) =&gt; a -&gt; (a -&gt; a) -&gt; a -&gt; a
  </code></pre>
  
  <p>(Data.Maclaurin is exported by the package vector-space.) So it takes a Num, a function, another Num and ultimately returns a Num. What magic makes the following work?</p>
  
  <pre><code>Prelude Data.Maclaurin&gt; ((+) . ($) . (+)) 1 2 3
  6
  </code></pre>
  
  <p>2 is obviously not a function (a->a) or did I miss out on something?</p>