![]() |
.. (לתיקייה המכילה) | |
Where in the exercise are auxiliary functions allowed? | |
You can use auxiliary functions in question 1b and one auxiliary function in question 2b. In all other questions(1a, 2a, 3, 4, 5) auxiliary functions are not allowed. |
Are we allowed to use the function "Int.abs" during the exercise? | |
yes |
Are we allowed to use functions defined in other sections of the same question. | |
Yes. You can use for each function the functions you defined in the previous sections of the same question. If you defined foo in "9.a" you can use it to define baz in "9.b" . For this assignment they are not considered auxiliary functions. |
In question 5c can m and n contain leading zeros, | |
You can assume m and n are positive integers with no leading zeros. And the output doesn't need to contain leading zeroes: - imerge(0,123); val it = 123 : int |
Can we receive another explanation of the function NTimesGOnH? | |
In NTimesGOnH you are required to implement a function receiving, in a curried manner, three parameters: A polimorphic value h:'a A function that could work on that value: g:'a->'a An integer value i:int The result of the function should be a value: (g^i) (h). h could be any value permitted in the language and so it can also be a function. (since functions are values in ML - a point this question tries to convey) |
Can we have an explanation of the example given for nTimesGOnH? | |
The meaning of the expression (g^i) (h) should be made clear by the example given: h(x)=x+1; (g(h))(x)=h(x)+10 f = (NTimesGOnH h g 3) =(g^3)(h) f(x) = (g^3(h))(x) = g((g^2)(h))(x) = (g^2(h))(x) +10 = (g(h))(x) +10 +10 = h(x) +10 +10 +10 = 30 + h(x) f(1) = 30 +h(1) = 30 +1 +1 = 32 |
in q2B we were requested to implement primary but in the test there was a call to prime. Which function should we implement? | |
You need to implement primary, the test file was updated - this call has changed to be a call to primary. |
What should the run examples submission contain? | |
The running examples are only meant to show you understand what you have implemented, preferably short, concise and with the output. |