--- a/handouts/ho04.tex Sun May 07 03:01:29 2017 +0100
+++ b/handouts/ho04.tex Tue May 09 12:31:55 2017 +0100
@@ -91,11 +91,13 @@
letters, while values just start with a single upper-case
character and the rest are lower-case letters.
-{\small\lstinputlisting[language=Scala,numbers=none]
+{\small\lstinputlisting[language=Scala,numbers=none,linebackgroundcolor=
+ {\ifodd\value{lstnumber}\color{capri!3}\fi}]
{../progs/app01.scala}}
-{\small\lstinputlisting[language=Scala,numbers=none]
+{\small\lstinputlisting[language=Scala,numbers=none,linebackgroundcolor=
+ {\ifodd\value{lstnumber}\color{capri!3}\fi}]
{../progs/app02.scala}}
@@ -580,7 +582,8 @@
\end{figure}
\begin{figure}[p]
-\lstinputlisting{../progs/app61.scala}
+\lstinputlisting[numbers=left,linebackgroundcolor=
+ {\ifodd\value{lstnumber}\color{capri!3}\fi}]{../progs/app61.scala}
\caption{The Scala code for the simplification function. The
first part defines some auxillary functions for the rectification.
@@ -639,7 +642,8 @@
be regarded as a regular expression. The extended definition
in Scala therefore looks as follows:
-{\small\lstinputlisting[language=Scala]
+{\small\lstinputlisting[language=Scala, numbers=none,linebackgroundcolor=
+ {\ifodd\value{lstnumber}\color{capri!3}\fi}]
{../progs/app03.scala}}
\noindent Since we regard records as regular expressions we
@@ -648,7 +652,8 @@
to extend the definition of values, which in Scala looks as
follows:
-{\small\lstinputlisting[language=Scala]
+{\small\lstinputlisting[language=Scala, numbers=none,linebackgroundcolor=
+ {\ifodd\value{lstnumber}\color{capri!3}\fi}]
{../progs/app04.scala}}
\noindent Let us now look at the purpose of records more