I have a test tomorrow that I am revising for and the lecturer has supplied some sample questions with no answers. I was hoping I could get some help with a couple of them.
I've written what I think the answer is for them.
1. What is the type of the set {1, 2, 3}?
integer/number
2. What is the type of the set {{1}, {2}, {3}}?
integer/number (unsure what putting each number in {} does?)
3. What is the type of the set {{1}, {2}, {3}, empty}?
integer/number
4. What is the type of the set {1, {2}, 3}? — is it well typed?
integer/number
5. What is the type of the set {1, 2, john}? — is it well typed?
unsure for a mixed set. Taking a complete guess of void or empty.
Any help will be much appreciated.