From e315e78b39b60a4e936f4c046dd04c8d8d2f6f89 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 21 Apr 2015 13:46:31 +0200 Subject: [PATCH] Adjust questions, because we omitted the ADT section --- VL1/content/VL1_questions_for_you.tex | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/VL1/content/VL1_questions_for_you.tex b/VL1/content/VL1_questions_for_you.tex index b3651cc..a7e0a6b 100644 --- a/VL1/content/VL1_questions_for_you.tex +++ b/VL1/content/VL1_questions_for_you.tex @@ -7,11 +7,10 @@ \item When are types checked in haskell? \item What are the differences between lists and pairs? \end{itemize} -Does this compile? If not, fix it. Is this a total or a partial function? +Is this a total or a partial function? Would you extend it? How? \begin{haskellcode} -data IntOrDouble = MkDouble Double - | MkInt Int - -f :: Int -> IntOrDouble -f 0 = 0.5 +even :: Int -> Bool +f 0 = True +f 2 = True +f 4 = True \end{haskellcode} \ No newline at end of file