--- a/progs/lecture1.scala Fri Nov 06 01:07:26 2020 +0000
+++ b/progs/lecture1.scala Sat Nov 07 19:13:06 2020 +0000
@@ -1,21 +1,21 @@
// Scala Lecture 1
//=================
+
// Value assignments
// (their names should be lower case)
//====================================
+val x = 42
+val y = 3 + 4
+val z = x / y
+val x = 70
+print(z)
+
+// (you cannot reassign values: z = 9 will give an error)
//var z = 9
//z = 10
-val x = 42
-val y = 3 + 4
-val z = x / y
-val x = 70
-
-// (you cannot reassign values: z = 9 will give an error)
-
-
// Hello World
//=============
@@ -92,14 +92,11 @@
val lst = List(1,2,3,1)
-
println(lst.toString)
println(lst.mkString)
println(lst.mkString(","))
-println(lst.mkString(", "))
-
// some methods take more than one argument
println(lst.mkString("{", ",", "}"))