/* __ *\ ** ________ ___ / / ___ Scala API ** ** / __/ __// _ | / / / _ | (c) 2002-2011, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** \* */ // generated by genprod on Wed Apr 23 10:06:16 CEST 2008 (with fancy comment) (with extra methods) package scala /**
* Function with 1 parameters. *
*
In the following example the definition of
* succ
is a shorthand for the anonymous class definition
* anonfun1
:
*
* object Main extends App { * * val succ = (x: Int) => x + 1 * * val anonfun1 = new Function1[Int, Int] { * def apply(x: Int): Int = x + 1 * } * * println(succ(0)) * println(anonfun1(0)) * }*/ trait Function1[@specialized -T1, @specialized +R] extends AnyRef { self => def apply(v1:T1): R override def toString() = "