From e04217c4c02ac9f8ba5ddc60b718dc8e0fb00191 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 20 Apr 2015 20:14:07 +0200 Subject: [PATCH] Format comment nicer --- VL1/content/VL1_lists2.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/VL1/content/VL1_lists2.tex b/VL1/content/VL1_lists2.tex index 8b29b4a..c18c75b 100644 --- a/VL1/content/VL1_lists2.tex +++ b/VL1/content/VL1_lists2.tex @@ -1,13 +1,13 @@ Let's check on a few very common list operations: \begin{haskellcode} -> [1, 2] ++ [4, 5] -- append two lists -> head [1, 2, 3] -- first element -> tail [1, 2, 3] -- everything after the head +> [1, 2] ++ [4, 5] -- append two lists +> head [1, 2, 3] -- first element +> tail [1, 2, 3] -- everything after the head > reverse [1, 2, 3] -- reverse a list -> take 2 [1, 2, 3] -- take the first two elements -> drop 2 [1, 2, 3] -- drop the first two elements +> take 2 [1, 2, 3] -- take the first two elements +> 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? +> elem 7 [1, 2, 3] -- is there a 7 in the list? \end{haskellcode} \pause A String in haskell is just a list of Chars!