The following equivalents:
scala> val f1 = {i: Int => i == 1}
f1: Int => Boolean = <function1>
scala> val f2 = (i: Int) => i == 1
f2: Int => Boolean = <function1>
I am more familiar with the former (based on Groovy), but the latter form is much more common, AFAIK, the standard way to define a function in Scala.
Should I forget the past (Groovy) and take a second form? 1st form is more natural for me, because it looks like Groovy / Ruby / Javascript way of defining closures (functions)
EDIT
See Zeiger's answer in this thread , for example, where Groovy / ruby / javascript close syntax {=>}seems more natural than () =>I assume that both can be used interchangeably with the same performance, passing ability, etc. and that the only difference is the syntax