diff --git a/README.md b/README.md
index ad3be0c..282a61a 100644
--- a/README.md
+++ b/README.md
@@ -42,9 +42,16 @@ the `png` versions of all modified diagrams).
2. Install the File Watchers plugin
1. Add a File Watcher to watch the `slides` folder and process `puml` files in these folders:

+ 2. use the arguments `-tsvg -nometadata $FileName$` if you want SVG instead of the default PNG
1. Create a custom `scope` to limit the file watcher:

Automatically generate .png results from changed .puml files:
* install File Watcher plugin in IntelliJ
* See https://www.jetbrains.com/help/idea/using-file-watchers.html#ws_file_watchers_bedore_you_start for background info
+
+## Slide handouts
+* open slides with `http://localhost:8000/?print-pdf`
+* print selected pages (omitting the exercise solutions)
+ * Session 1: 1-56,58-98
+ * Session 2: 100-102,104-125,127-130,132-157
diff --git a/Scala 101 Student guide session 1.pdf b/Scala 101 Student guide session 1.pdf
index 59c8ac3..2f584be 100644
Binary files a/Scala 101 Student guide session 1.pdf and b/Scala 101 Student guide session 1.pdf differ
diff --git a/Scala 101 Student guide session 2.pdf b/Scala 101 Student guide session 2.pdf
index b9c50bf..c2acd80 100644
Binary files a/Scala 101 Student guide session 2.pdf and b/Scala 101 Student guide session 2.pdf differ
diff --git a/exercises/src/main/scala/exercise2/Hamlet.scala b/exercises/src/main/scala/exercise2/Hamlet.scala
index b5762ec..b2e35d5 100644
--- a/exercises/src/main/scala/exercise2/Hamlet.scala
+++ b/exercises/src/main/scala/exercise2/Hamlet.scala
@@ -1,17 +1,28 @@
package exercise2
-// TODO: Uncomment the lines in the app and add the code needed to make it print
-// "Hamlet, by William Shakespeare, as published in 1603" to the screen"
+// TODO: Follow the instructions in the app and add the code needed to make it print
+// "Hamlet, by William Shakespeare, as published in 1603" to the screen
object Hamlet extends App {
trait PrettyPrintable {
def prettyPrint: String
}
- def toScreen(p: PrettyPrintable): Unit = ???
+ def toScreen(p: PrettyPrintable): Unit = {
+ // ---- Add anything you need below this line
+ ???
+ // ---- Add anything you need above this line
+ }
+
+ // --- Add case classes below this line ---
+ // --- Add case classes above this line ---
+
+ // --- uncomment the lines below this line ---
//val shakespeare = Author("William", "Shakespeare")
//val hamlet = Book("Hamlet", shakespeare, 1603)
//toScreen(hamlet)
+
+ // --- uncomment the lines above this line ---
}
diff --git a/slides/index.html b/slides/index.html
index 96d7174..2b5801a 100644
--- a/slides/index.html
+++ b/slides/index.html
@@ -72,11 +72,12 @@
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
+ center: false,
margin: 0.01,
width: 1920,
height: 1080,
maxScale: 4,
- center: false,
+ pdfSeparateFragments: false,
slideNumber: 'c/t',
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealZoom, RevealMarkdown, RevealHighlight, RevealNotes, RevealMath.KaTeX ]
diff --git a/slides/scala101/images/list1.png b/slides/scala101/images/list1.png
deleted file mode 100644
index edf53ae..0000000
Binary files a/slides/scala101/images/list1.png and /dev/null differ
diff --git a/slides/scala101/images/list1.svg b/slides/scala101/images/list1.svg
new file mode 100644
index 0000000..48ff9de
--- /dev/null
+++ b/slides/scala101/images/list1.svg
@@ -0,0 +1,8 @@
+
\ No newline at end of file
diff --git a/slides/scala101/images/list2.png b/slides/scala101/images/list2.png
deleted file mode 100644
index 21053db..0000000
Binary files a/slides/scala101/images/list2.png and /dev/null differ
diff --git a/slides/scala101/images/list2.svg b/slides/scala101/images/list2.svg
new file mode 100644
index 0000000..9d31b8d
--- /dev/null
+++ b/slides/scala101/images/list2.svg
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/slides/scala101/session1/module1.md b/slides/scala101/session1/module1.md
index 5203f8e..34e67a2 100644
--- a/slides/scala101/session1/module1.md
+++ b/slides/scala101/session1/module1.md
@@ -110,7 +110,7 @@ notes: Ask audience what differences they spot
val str = "hello"
str.contains("e") // normal function call
-s contains "e" // infix notation of same call
+str contains "e" // infix notation of same call
```
@@ -226,8 +226,8 @@ val todo = ???
## Extra
* Open https://scala-lang.org/api/current
-* Find `RichInt.to`
+* Find `Int.to`
* What parameters does it accept?
* What does it return?
-* What about `RichInt.until`?
+* What about `Int.until`?
diff --git a/slides/scala101/session1/module2.md b/slides/scala101/session1/module2.md
index af38af9..2c0482a 100644
--- a/slides/scala101/session1/module2.md
+++ b/slides/scala101/session1/module2.md
@@ -80,12 +80,15 @@ class Circle(val r: Double) {
## Methods
```scala
class Circle(val r: Double) {
-
+
def draw(c: Canvas): Unit = {
- val box = determineBoundingBox // draw using box
+ val box = determineBoundingBox
+
+ // draw on canvas c using box
private def determineBoundingBox = new Rectangle(2 * r, 2 * r)
}
+}
```
notes: Unit in Scala is same as void in Java
diff --git a/slides/scala101/session1/module4.md b/slides/scala101/session1/module4.md
index de5a3e5..2a1ee98 100644
--- a/slides/scala101/session1/module4.md
+++ b/slides/scala101/session1/module4.md
@@ -14,7 +14,7 @@
val xs = List(1, 2, 3)
```
-
+
==
@@ -25,7 +25,7 @@ val xs = List(1, 2, 3)
val ys = 0 :: xs
```
-
+
* Immutable collections can be implemented efficiently by re-using parts of existing collections
* In a linked list, pre-pending simply re-uses the existing list, and the old pointer remains valid
diff --git a/slides/scala101/session2/module5.md b/slides/scala101/session2/module5.md
index 0dd2d96..bfbe035 100644
--- a/slides/scala101/session2/module5.md
+++ b/slides/scala101/session2/module5.md
@@ -84,7 +84,7 @@ lazy val pi = veryExpensiveComputation
```scala
val discount = if (totalPrice > 100) totalPrice * 0.05 else 0.0
-val x: Unit = prinln("Hello world")
+val x: Unit = println("Hello world")
println(x)
// Hello world
diff --git a/slides/scala101/session2/module7.md b/slides/scala101/session2/module7.md
index eb4986e..2ab791e 100644
--- a/slides/scala101/session2/module7.md
+++ b/slides/scala101/session2/module7.md
@@ -21,7 +21,7 @@ for (i <- 1 to 10) println(i)
(1 to 10) foreach { println(_) }
// is equivalent to
-1 to 3 foreach println
+1 to 10 foreach println
```
===