Función anónima de Scala
val square = (x: Double) => x*x
David Alfredo Quintero
val square = (x: Double) => x*x
i => i * 2
() => scala.util.Random.nextInt
// or //
(x: Int, y: Int) => (x + 1, y + 1)