![]() |
.. (לתיקייה המכילה) | |
ML prints my strings abrupt with a # sign and returns an error for large integers? | |
You are not required in this assignment to handle large integers or making sure large string are printed correctly. For those interested in a solution to each of the two issues, it appears in the FAQ, ML general section. They should not be part of the submission. |
In question one are we allowed to use local variables for the defintion of square/triangle/rectangle? | |
No. you are not allowed any local variables. |
In question 2b, should a dot appear after avery statement x has y parameters? | |
Yes. A dot appear after avery statement "x has y permissions", and every "x - wrong parameter." ( e.g. "Owner has read permissions.") |
Can we use andalso and orelse in our homework? | |
Yes |
Is a function returning a unit in ML considered a procedure? | |
For the intention of this exercise no. You should search for an example in other languages. |
Is it ok to split to cases in question 2 and handle each separately? | |
Yes. you should use pattern matching in the function parameters. |
We are having difficulty with the dry part can we receive some hints? | |
You can consult the following references for what you don't find in C or ML: http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx http://en.csharp-online.net/CSharp_Language_Specification |
Additional notes about the dry question and the supplied links: | |
When you find a mechanism you think is appropriate explain, in one line or two, your understanding of it and shortly why does it fit (for example present a code statement achieving the desired feature with that mechanism.) |
I receive a "choose1 = fn : {k:int,n:int} -> int" signature instead of {n:int,k:int} . Is that ok? | |
Yes. Thats ok. ML sorts the record elements names, he prints out, alphabetically. |
Should we remove the function "smallTrig" before submitting the code, in the first question of the first section ? | |
Yes please remove it. |
The suggested output contains a "val it = () : unit" at it's end should we worry about it? | |
It appears since I used "use" function. It's ok if you don't receive it. |