.. (לתיקייה המכילה) | ||
In question 6b, do we really have to imlpement the function "add" in ML? | |
No, this question is about a hypothetical version of ML that doesn't really exist. You can't implement this function in ML. You should write code that would work on the hypothetical version of ML that's described in the question. |
In question 4a, do we have to handle the thrown exceptions if we try to access the element in place (n+1)? | |
No. The exception should be thrown. As written in the submission instructions, you shouldn't handle any exceptions in the code unless you're told to do so explicitly. |
In question 4a: If we call truncSeq with a sequence with k < n elements, what should be returned after running tail() k times on the returned sequence? | |
It should be Nil, just like in the original sequence. |
How can I write a handle that catches all possible exceptions? | |
<some code> handle x => <handling code> Or, if you don't need to use the caught exception: <some code> handle _ => <handling code> |
May we ignore "Warning: calling polyEqual" warnings? | |
Yes. This warning doesn't indicate any real problem with the code. You can also try turning these warnings off with the command: "Control.polyEqWarn := false" |