Adjust questions, because we omitted the ADT section
This commit is contained in:
parent
efc0f586ed
commit
e315e78b39
@ -7,11 +7,10 @@
|
|||||||
\item When are types checked in haskell?
|
\item When are types checked in haskell?
|
||||||
\item What are the differences between lists and pairs?
|
\item What are the differences between lists and pairs?
|
||||||
\end{itemize}
|
\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}
|
\begin{haskellcode}
|
||||||
data IntOrDouble = MkDouble Double
|
even :: Int -> Bool
|
||||||
| MkInt Int
|
f 0 = True
|
||||||
|
f 2 = True
|
||||||
f :: Int -> IntOrDouble
|
f 4 = True
|
||||||
f 0 = 0.5
|
|
||||||
\end{haskellcode}
|
\end{haskellcode}
|
Loading…
Reference in New Issue
Block a user