I am attempting to write a function which compares two lists to see if they represent the same set. That is \'(a b c d d) and \'(d c b a d) represent
\'(a b c d d)
\'(d c b a d)
I guess you are not allowed to use built-in functions for solving the problem, but just to note there is one:
(set-difference list1 list2)