1
0
Derivar 0

Explain String in terms of [Char]

Este cometimento está contido em:
Julian Ospald 2015-04-15 17:46:47 +02:00
ascendente 162b8e109b
cometimento 22aae2a262
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados
ID da chave GPG: 220CD1C5BDEED020
1 ficheiros modificados com 12 adições e 0 eliminações

12
VL1.tex
Ver ficheiro

@ -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.