What is the eta expansion in Scala?

The definition, and some examples, are given in http://scala-lang.org/files/archive/spec/2.11/06-expressions.html#method-values. someMethod _ will roughly be translated to a new function object like this: Not quite: it’s actually new Function1[Int, Int] { def apply(x: Int): Int = someMethod(x) } The difference matters e.g. if someMethod is overridden somewhere. Is it all that Scala does? You also need … Read more