diff options
author | schinz <schinz@epfl.ch> | 2003-08-05 13:34:55 +0000 |
---|---|---|
committer | schinz <schinz@epfl.ch> | 2003-08-05 13:34:55 +0000 |
commit | 4997e2ee05c6b3f395c39eae756b4ee5945408e5 (patch) | |
tree | 970ee28d73504da329ba3f20266e43ef9c55665f | |
parent | 5c9050c6b5a6ce0977c3c142982faf0fd3c14a66 (diff) | |
download | scala-4997e2ee05c6b3f395c39eae756b4ee5945408e5.tar.gz scala-4997e2ee05c6b3f395c39eae756b4ee5945408e5.tar.bz2 scala-4997e2ee05c6b3f395c39eae756b4ee5945408e5.zip |
- added the identity function (id)
-rw-r--r-- | sources/scala/Predef.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/scala/Predef.scala b/sources/scala/Predef.scala index 73970c81fc..035a178a15 100644 --- a/sources/scala/Predef.scala +++ b/sources/scala/Predef.scala @@ -33,6 +33,8 @@ object Predef { def exit: scala.Unit = System.exit(0); + def id[a](x: a): a = x; + def synchronized[A](obj: AnyRef)(def body: A) = scala.runtime.NativeMonitor.synchronised(obj, body); |