Questions about "sets"
Posted
by
James
on Stack Overflow
See other posts from Stack Overflow
or by James
Published on 2013-10-31T21:36:29Z
Indexed on
2013/10/31
21:54 UTC
Read the original article
Hit count: 113
set
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.
© Stack Overflow or respective owner