title: Difference between dot and space in Scala
body: <p>What precisely is the difference between <code>.</code> and <code></code> when used to invoke functions from objects in Scala?</p>
  
  <p>For some reason, I get variations, like:</p>
  
  <pre><code>scala&gt; val l:List[Int] = 1::Nil
  l: List[Int] = List(1, 2, 3)
  
  scala&gt; l foldLeft(0)((hd, nxt) =&gt; hd + nxt) 
  &lt;console&gt;:13: error: Int(1) does not take parameters
         | foldLeft(1)((hd, nxt) =&gt; hd + nxt)
                      ^
  scala&gt;l.foldLeft(0)((hd, nxt) =&gt; hd + nxt)
  res2: Int = 2
  </code></pre>
  
  <p>(And while I'm at it, what's the name of that operation? I kept trying to find the strict definition of the <code>.</code> operator and I have no idea what it's called.)</p>