summaryrefslogtreecommitdiff
path: root/docs/examples/futures.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2006-02-22 17:54:31 +0000
committermichelou <michelou@epfl.ch>2006-02-22 17:54:31 +0000
commit96ae92e4f6f830a9a4e55768c3de0328a2a030ba (patch)
tree0b84d247c1693bf186787aaa8f0c75d89fea9be3 /docs/examples/futures.scala
parentc1e184a3657d970a8fba6e3c7049f20a2e466bf0 (diff)
downloadscala-96ae92e4f6f830a9a4e55768c3de0328a2a030ba.tar.gz
scala-96ae92e4f6f830a9a4e55768c3de0328a2a030ba.tar.bz2
scala-96ae92e4f6f830a9a4e55768c3de0328a2a030ba.zip
adapted code to Scala 2 syntax in files src/exa...
adapted code to Scala 2 syntax in files src/examples/**/*.scala
Diffstat (limited to 'docs/examples/futures.scala')
-rw-r--r--docs/examples/futures.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/examples/futures.scala b/docs/examples/futures.scala
index 905d360612..79682b5b76 100644
--- a/docs/examples/futures.scala
+++ b/docs/examples/futures.scala
@@ -1,17 +1,17 @@
-package examples;
+package examples
-import concurrent.ops._;
+import concurrent.ops._
object futures {
- def someLengthyComputation = 1;
- def anotherLengthyComputation = 2;
- def f(x: Int) = x + x;
- def g(x: Int) = x * x;
+ def someLengthyComputation = 1
+ def anotherLengthyComputation = 2
+ def f(x: Int) = x + x
+ def g(x: Int) = x * x
def main(args: Array[String]): Unit = {
- val x = future(someLengthyComputation);
- anotherLengthyComputation;
- val y = f(x()) + g(x());
+ val x = future(someLengthyComputation)
+ anotherLengthyComputation
+ val y = f(x()) + g(x())
Console.println(y)
}
} \ No newline at end of file