diff options
author | paltherr <paltherr@epfl.ch> | 2004-01-08 13:52:06 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-01-08 13:52:06 +0000 |
commit | c8eb73357f8a871c1772e578cefa4d744a9a5d32 (patch) | |
tree | e2b05de5f09fa7572ed80e6c146f231521a85288 | |
parent | 5ab98b10ad4b2d3faffe00462e3983810b722967 (diff) | |
download | scala-c8eb73357f8a871c1772e578cefa4d744a9a5d32.tar.gz scala-c8eb73357f8a871c1772e578cefa4d744a9a5d32.tar.bz2 scala-c8eb73357f8a871c1772e578cefa4d744a9a5d32.zip |
- Added method List.apply
-rw-r--r-- | sources/scala/List.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sources/scala/List.scala b/sources/scala/List.scala index b618a85e0a..9580678205 100644 --- a/sources/scala/List.scala +++ b/sources/scala/List.scala @@ -18,6 +18,13 @@ package scala; */ object List { + /** Create a list with given elements. + * + * @param xs the elements to put in the list + * @return the list containing elements xs. + */ + def apply[A](xs: A*): List[A] = xs.asInstanceOf[List[A]]; + /** Create a sorted list of all integers in a range. * * @return the sorted list of all integers in range [from;end). |