--- a/progs/lecture1.scala Fri Nov 10 09:00:46 2017 +0000
+++ b/progs/lecture1.scala Fri Nov 10 09:23:23 2017 +0000
@@ -123,16 +123,16 @@
println("""">\n<"""")
/* in Java
-val lyrics = "Sun dips down, the day has gone \n" +
- "Witches, wolves and giants yawn \n" +
- "Queen and dragon, troll and gnome \n" +
- "Baddy buddies head for home"
+val lyrics = "Sun dips down, the day has gone. \n" +
+ "Witches, wolves and giants yawn. \n" +
+ "Queen and dragon, troll and gnome: \n" +
+ "tired buddies head for home"
*/
-val lyrics = """Sun dips down, the day has gone
- |Witches, wolves and giants yawn
- |Queen and dragon, troll and gnome
- |Baddy buddies head for home""".stripMargin
+val lyrics = """Sun dips down, the day has gone.
+ |Witches, wolves and giants yawn.
+ |Queen and dragon, troll and gnome:
+ |tired buddies head for home""".stripMargin
println(lyrics)
@@ -171,7 +171,7 @@
// If-Conditionals
//=================
-def fact(n: Int): Int =
+def fact(n: Int) : Int =
if (n == 0) 1 else n * fact(n - 1)