--- a/progs/lecture1.scala Wed Nov 09 01:18:08 2016 +0000
+++ b/progs/lecture1.scala Wed Nov 09 06:02:31 2016 +0000
@@ -1,10 +1,10 @@
-
-// webpages
-
+// Lecture 1
+//==========
//**Assignments (values)**
//(variable names should be lower case)
//=====================================
+
val x = 42
val y = 3 + 4
@@ -39,7 +39,7 @@
println(lst.mkString("\n"))
// some methods take more than one argument
-println(lst.mkString("[",",","]"))
+println(lst.mkString("[", ",", "]"))
//**Conversion methods**
//======================
@@ -78,6 +78,9 @@
def square(x: Int): Int = x * x
+
+
+
//**Ifs control structures**
//==========================
@@ -116,3 +119,6 @@
val mtable = for (n <- (1 to 10).toList; m <- (1 to 10).toList) yield m * n
mtable.sliding(10,10).toList.mkString(
+
+
+// webpages