progs/lecture1.scala
changeset 18 87e55eb309ed
parent 15 52713e632ac0
child 21 610f7a4a9ede
--- a/progs/lecture1.scala	Tue Nov 08 10:37:18 2016 +0000
+++ b/progs/lecture1.scala	Wed Nov 09 00:52:08 2016 +0000
@@ -2,8 +2,9 @@
 // webpages
 
 
-//**Assignment (values)**
-//=======================
+//**Assignments (values)**
+//(variable names should be lower case)
+//=====================================
 val x = 42
 val y = 3 + 4
 
@@ -18,6 +19,10 @@
 
 (1 until 10).toList
 
+// an element in a list
+List(1,2,3,1)(0)
+List(1,2,3,1)(3)
+
 
 //**Printing/Strings**
 //====================