Browse Source

Adjust questions, because we omitted the ADT section

stripped-german
Julian Ospald 9 years ago
parent
commit
e315e78b39
No known key found for this signature in database GPG Key ID: 220CD1C5BDEED020
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      VL1/content/VL1_questions_for_you.tex

+ 5
- 6
VL1/content/VL1_questions_for_you.tex View File

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

Loading…
Cancel
Save