summaryrefslogtreecommitdiff
path: root/test/files/run/t0421.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t0421.scala')
-rw-r--r--test/files/run/t0421.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/t0421.scala b/test/files/run/t0421.scala
index b69373f341..121fc4f2f0 100644
--- a/test/files/run/t0421.scala
+++ b/test/files/run/t0421.scala
@@ -7,17 +7,17 @@ object Test extends Application {
}
def scalprod(xs: Array[Double], ys: Array[Double]) = {
- var acc = 0.0
- for ((x, y) <- xs zip ys) acc = acc + x * y
+ var acc = 0.0
+ for ((x, y) <- xs zip ys) acc = acc + x * y
acc
}
def matmul(xss: Array[Array[Double]], yss: Array[Array[Double]]) = {
- val ysst = transpose(yss)
+ val ysst = transpose(yss)
val ysst1: Array[Array[Double]] = yss.transpose
assert(ysst.deep == ysst1.deep)
for (xs <- xss) yield
- for (yst <- ysst) yield
+ for (yst <- ysst) yield
scalprod(xs, yst)
}
@@ -25,6 +25,6 @@ object Test extends Application {
println(transpose(a1).deepMkString("[", ",", "]"))
println(matmul(Array(Array(2, 3)), Array(Array(5), Array(7))).deepMkString("[", ",", "]"))
-
+
println(matmul(Array(Array(4)), Array(Array(6, 8))).deepMkString("[", ",", "]"))
}