diff options
author | Martin Odersky <odersky@gmail.com> | 2008-04-02 14:43:16 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-04-02 14:43:16 +0000 |
commit | fd417cfa960542d72e54cafd44eff8941fff8f1e (patch) | |
tree | 437db04e06a295ebb309bc72daa9110cc14d8201 /src/library/scala/Function.scala | |
parent | 694b5caf290c9cda64077878e3cebf6f324b929c (diff) | |
download | scala-fd417cfa960542d72e54cafd44eff8941fff8f1e.tar.gz scala-fd417cfa960542d72e54cafd44eff8941fff8f1e.tar.bz2 scala-fd417cfa960542d72e54cafd44eff8941fff8f1e.zip |
moved swing classes to package scala.swing; fix...
moved swing classes to package scala.swing; fixed bugs for regexes and
parsers; fixed t0674.
Diffstat (limited to 'src/library/scala/Function.scala')
-rw-r--r-- | src/library/scala/Function.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library/scala/Function.scala b/src/library/scala/Function.scala index 12e124779b..9df4ceefe7 100644 --- a/src/library/scala/Function.scala +++ b/src/library/scala/Function.scala @@ -27,6 +27,9 @@ object Function { */ def chain[a](fs: Seq[a => a]): a => a = { x => (x /: fs) ((x, f) => f(x)) } + /** The constant function */ + def const[T, U](x: T)(y: U): T = x + /** Currying for functions of arity 2. This transforms a function * of arity 2 into a a unary function returning another unary function. * |