title: Why are types of a named function different from an anonymous one in scala
body: <p>In scala, a named function is defined as:</p>
  
  <pre><code>scala&gt; def addOne(x: Int): Int = x+1
  addOne: (x: Int)Int
  
  scala&gt; :type addOne
  (x: Int)Int
  </code></pre>
  
  <p>And an anonymous one as:</p>
  
  <pre><code>scala&gt; val addOne = (x:Int) =&gt; x+1
  addOne: Int =&gt; Int = &lt;function1&gt;
  
  scala&gt; :type addOne
  Int =&gt; Int
  </code></pre>
  
  <p>Why do their types look different?</p>
  
  <p>Why can't a named function be passed as an argument to another function?</p>
  
  <p>Shouldn't both be treated uniformly from type and first-order behavior point of views?</p>