diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-20 01:00:24 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-24 19:59:27 -0700 |
commit | 1d0372f84f9a7325a47beb55169cc454895ef74b (patch) | |
tree | 920b95193b2cbb63b75517d67c668eda1d563a06 /src/library/scala/Function1.scala | |
parent | 211df62491ada71a4a574fd2314942ab3c4a4ba8 (diff) | |
download | scala-1d0372f84f9a7325a47beb55169cc454895ef74b.tar.gz scala-1d0372f84f9a7325a47beb55169cc454895ef74b.tar.bz2 scala-1d0372f84f9a7325a47beb55169cc454895ef74b.zip |
Moved ancillary methods off specialized traits.
Moved compose/andThen off Function1, curried/tupled off Function2.
Pushed Tuple2 zipped into auxiliary class. Created implicits to
plaster over the changes. This drops several hundred classfiles and
takes (unoptimized) scala-library.jar from 7.8 Mb to 7.4 Mb.
Diffstat (limited to 'src/library/scala/Function1.scala')
-rw-r--r-- | src/library/scala/Function1.scala | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/library/scala/Function1.scala b/src/library/scala/Function1.scala index 8995ef912b..a4391c1509 100644 --- a/src/library/scala/Function1.scala +++ b/src/library/scala/Function1.scala @@ -38,21 +38,5 @@ trait Function1[@specialized(scala.Int, scala.Long, scala.Float, scala.Double, s */ def apply(v1: T1): R - /** Composes two instances of Function1 in a new Function1, with this function applied last. - * - * @tparam A the type to which function `g` can be applied - * @param g a function A => T1 - * @return a new function `f` such that `f(x) == apply(g(x))` - */ - def compose[A](g: A => T1): A => R = { x => apply(g(x)) } - - /** Composes two instances of Function1 in a new Function1, with this function applied first. - * - * @tparam A the result type of function `g` - * @param g a function R => A - * @return a new function `f` such that `f(x) == g(apply(x))` - */ - def andThen[A](g: R => A): T1 => A = { x => g(apply(x)) } - override def toString() = "<function1>" } |