# HG changeset patch # User Christian Urban # Date 1410733942 -3600 # Node ID a5fade10c207d2d99cc8396de3b38d4aab3042ad # Parent 771042ac7c3f030bd5d4c5ab041dfb54fbd3e761 updated diff -r 771042ac7c3f -r a5fade10c207 handouts/ho01.pdf Binary file handouts/ho01.pdf has changed diff -r 771042ac7c3f -r a5fade10c207 handouts/ho01.tex --- a/handouts/ho01.tex Sun Sep 14 15:18:58 2014 +0100 +++ b/handouts/ho01.tex Sun Sep 14 23:32:22 2014 +0100 @@ -312,7 +312,8 @@ If you prefer to think in terms of the implementation of regular expressions in Scala, the constructors and -classes relate as follows +classes relate as follows\footnote{More about Scala is +in the handout about a crash-course on Scala.} \begin{center} \begin{tabular}{rcl} diff -r 771042ac7c3f -r a5fade10c207 handouts/scala-ho.pdf Binary file handouts/scala-ho.pdf has changed diff -r 771042ac7c3f -r a5fade10c207 handouts/scala-ho.tex --- a/handouts/scala-ho.tex Sun Sep 14 15:18:58 2014 +0100 +++ b/handouts/scala-ho.tex Sun Sep 14 23:32:22 2014 +0100 @@ -88,8 +88,8 @@ between a function that returns a result, like addition, and a function that causes a side-effect, like \code{print}. We shall come back to this point later, but if you are curious -now, the latter kind of functions always has as return type -\code{Unit}. +now, the latter kind of functions always has \code{Unit} as +return type. If you want to write a stand-alone app in Scala, you can implement an object that is an instance of \code{App}, say @@ -149,7 +149,7 @@ familiar with Java, it might be an instructive exercise to define this kind of inductive datatypes in Java\footnote{Happy programming! \Smiley} and then compare it with how it can be -defined in Scala. +implemented in Scala. Implementing the regular expressions from above in Scala is actually very simple: It first requires an \emph{abstract @@ -360,7 +360,7 @@ cases above did not match. Cases are always tried out from top to bottom. -\subsection*{Loops, or the Absence of} +\subsection*{Loops, or the Absence thereof} Coming from Java or C, you might be surprised that Scala does not really have loops. It has instead, what is in functional