diff options
author | michelou <michelou@epfl.ch> | 2006-12-08 19:10:22 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-12-08 19:10:22 +0000 |
commit | 1e5fd9b56a92dc162ce28346b0a705e8940f58d9 (patch) | |
tree | a9d180c01e2c44bdc7bb7d8104881c523e45706d /src/library/scala/Function1.scala | |
parent | cb3adcfb6d0023da523c6a9f04dc8b7b5555e85c (diff) | |
download | scala-1e5fd9b56a92dc162ce28346b0a705e8940f58d9.tar.gz scala-1e5fd9b56a92dc162ce28346b0a705e8940f58d9.tar.bz2 scala-1e5fd9b56a92dc162ce28346b0a705e8940f58d9.zip |
updated genprod.scala (Function1)
Diffstat (limited to 'src/library/scala/Function1.scala')
-rw-r--r-- | src/library/scala/Function1.scala | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/library/scala/Function1.scala b/src/library/scala/Function1.scala index 68cf8f3ad4..4fb3a4aa9d 100644 --- a/src/library/scala/Function1.scala +++ b/src/library/scala/Function1.scala @@ -1,39 +1,42 @@ /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** +** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** \* */ -// generated on Tue Nov 28 17:25:56 CET 2006 (with fancy comment) (with extra methods) // $Id$ +// generated by genprod on Fri Dec 08 20:07:08 CET 2006 (with fancy comment) (with extra methods) + package scala -/** - * Function with 1 parameters. In the following example the definition of - * <code>succ</code> is a shorthand for the anonymous class definition - * <code>anonfun1</code>: - * <pre> - * <b>object</b> Main <b>extends</b> Application { +/** <p> + * Function with 1 parameters. + * </p> + * <p> + In the following example the definition of + * <code>succ</code> is a shorthand for the anonymous class definition + * <code>anonfun1</code>: + * </p> + * <pre> + * <b>object</b> Main <b>extends</b> Application { * - * <b>val</b> succ = (x: Int) => x + 1 + * <b>val</b> succ = (x: Int) => x + 1 * - * <b>val</b> anonfun1 = <b>new</b> Function1[Int, Int] { - * <b>def</b> apply(x: Int): Int = x + 1 - * } + * <b>val</b> anonfun1 = <b>new</b> Function1[Int, Int] { + * <b>def</b> apply(x: Int): Int = x + 1 + * } * - * Console.println(succ(0)) - * Console.println(anonfun1(0)) - * }</pre> + * Console.println(succ(0)) + * Console.println(anonfun1(0)) + * }</pre> */ -trait Function1 [-T1, +R] extends AnyRef { - +trait Function1[-T1, +R] extends AnyRef { def apply(v1:T1): R - override def toString() = "<function>" /** (f compose g)(x) = f(g(x)) @@ -43,4 +46,5 @@ trait Function1 [-T1, +R] extends AnyRef { /** (f andThen g)(x) = g(f(x)) */ def andThen[A](g: R => A): T1 => A = { x => g(apply(x)) } + } |