Julian Ospald
9 anos atrás
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados
ID da chave GPG: 220CD1C5BDEED020
1 arquivos alterados com
12 adições e
0 exclusões
-
VL1.tex
|
|
@@ -380,6 +380,18 @@ infiniteList = [1..] |
|
|
|
\end{lstlisting} |
|
|
|
\end{frame} |
|
|
|
|
|
|
|
\begin{frame}[fragile] |
|
|
|
\frametitle{Lists (ctn.)} |
|
|
|
A String in haskell is just a list of Chars! |
|
|
|
\setHaskellCodeStyle |
|
|
|
\begin{lstlisting} |
|
|
|
> ['a', 'b', 'c'] |
|
|
|
> 'a' : [] |
|
|
|
> head "abc" |
|
|
|
> 'a' ++ 'c' |
|
|
|
\end{lstlisting} |
|
|
|
\end{frame} |
|
|
|
|
|
|
|
\begin{frame}[fragile] |
|
|
|
\frametitle{Lists (ctn.)} |
|
|
|
Again, we can do pattern matching on lists. |
|
|
|