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