Code background grey, use special code-block for GHCi

This commit is contained in:
Julian Ospald
2015-04-20 20:15:46 +02:00
parent e04217c4c0
commit 6438c6fb02
4 changed files with 35 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
Let's check on a few very common list operations:
\begin{haskellcode}
\begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
> [1, 2] ++ [4, 5] -- append two lists
> head [1, 2, 3] -- first element
> tail [1, 2, 3] -- everything after the head
@@ -8,12 +8,12 @@ Let's check on a few very common list operations:
> drop 2 [1, 2, 3] -- drop the first two elements
> sum [1, 2, 3]
> elem 7 [1, 2, 3] -- is there a 7 in the list?
\end{haskellcode}
\end{haskellcode*}
\pause
A String in haskell is just a list of Chars!
\begin{haskellcode}
\begin{haskellcode*}{bgcolor=mygrey,frame=single,numbers=none,label=GHCi}
> ['a', 'b', 'c']
> 'a' : []
> head "abc"
> 'a' ++ 'c'
\end{haskellcode}
\end{haskellcode*}