I am supposed to make this table:
( ["Id"; "Name"; "Gender"; "Course"], [ ["2"; "Jim"; "Male"; "Geography"]; ["4"; "Linnea"; "Female"; "Economics"]; ["7"; "Steve"; "Male"; "Informatics"]; ["9"; "Hannah"; "Female"; "Geography"] ])
into a set instead of a list containing lists and thereby it should not include any duplicates. I should then be able to make the functions project, rename, and restrict on the set. How do I go about doing this?'
I used list.flatten within a function setToList and ListToSet which worked and the list did not include any duplicates but the attributes ID, Name, Gender and Course disappeared which means that when I tried to project (["Gender"], studentTable) it could not match with anything since the attribute names were gone. How do I make a sublist with them, which is what I guess I should be doing.