.. (לתיקייה המכילה) | ||
Can we define and use additional structs/classes in question 3? | |
No you cannot define new classes/structs. |
In question 3, we cannot get the example to work if the copy constructor is private. Is it possible that you made a mistake? | |
Yes, it is possbile. In fact, there is a mistake. Here is the correct rule regarding constructors in this question: all constructors must be private EXCEPT for the copy constructor which may be public. |
in question 2, do we need to implement the functions the same way as ML (recursive and so on)? | |
No. You only need to provide the interface and behavior. The implementation is up to you. |
What's the signature of the f parameter in question 2? | |
In map the signature of f is: int -> int In fold the signature of f is: int*int -> int |