summaryrefslogtreecommitdiff
path: root/test/files/run/Course-2002-10.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/Course-2002-10.scala')
-rw-r--r--test/files/run/Course-2002-10.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/Course-2002-10.scala b/test/files/run/Course-2002-10.scala
index e634309018..d92893772e 100644
--- a/test/files/run/Course-2002-10.scala
+++ b/test/files/run/Course-2002-10.scala
@@ -25,7 +25,7 @@ object M0 {
object M1 {
def scale(x: double, s: Stream[double]): Stream[double] =
- s map (e: double => e*x);
+ s map { e: double => e*x }
def partialSums(s: Stream[double]): Stream[double] =
Stream.cons(s.head, partialSums(s.tail) map (x => x + s.head));
@@ -46,14 +46,14 @@ object M1 {
better(s, transform) map (x => x.head);
def lnSummands(n: double): Stream[double] =
- Stream.cons(1.0 / n, lnSummands(n + 1.0) map (x: double => -x));
+ Stream.cons(1.0 / n, lnSummands(n + 1.0) map { x: double => -x })
var ln0 = partialSums(lnSummands(1.0));
var ln1 = euler(ln0);
var ln2 = veryGood(ln0, euler);
def piSummands(n: double): Stream[double] =
- Stream.cons(1.0 / n, piSummands(n + 2.0) map (x: double => -x));
+ Stream.cons(1.0 / n, piSummands(n + 2.0) map { x: double => -x })
var pi0 = scale(4.0, partialSums(piSummands(1.0)));
var pi1 = euler(pi0);