2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 22:38:04 +02:00

Added Scala example

This commit is contained in:
Martin Thoma 2014-03-10 15:39:59 +01:00
parent 420b6b31fd
commit 7e76256e4e
8 changed files with 60 additions and 5 deletions

View file

@ -162,16 +162,16 @@ Ein paar Beispiele zur Typinferenz:
\label{fig:haskell-type-hierarchy}
\end{figure}
\subsection{type}
\subsection{type}\xindex{type}%
Mit \texttt{type} können Typsynonyme erstellt werden:
\inputminted[linenos, numbersep=5pt, tabsize=4]{haskell}{scripts/haskell/alt-types.hs}
\inputminted[numbersep=5pt, tabsize=4]{haskell}{scripts/haskell/alt-types.hs}
\subsection{data}
\subsection{data}\xindex{data}%
Mit dem Schlüsselwort \texttt{data} können algebraische Datentypen\xindex{Datentyp!algebraischer}
erzeugt werden:
\inputminted[numbersep=5pt, tabsize=4]{haskell}{scripts/haskell/data-example.hs}
\section{Lazy Evaluation}\xindex{Lazy Evaluation}
Haskell wertet Ausdrücke nur aus, wenn es nötig ist.