瀏覽代碼

Explain String in terms of [Char]

stripped-german
Julian Ospald 9 年之前
父節點
當前提交
22aae2a262
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 220CD1C5BDEED020
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. +12
    -0
      VL1.tex

+ 12
- 0
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.


Loading…
取消
儲存