A function to compare sets; help improving efficiency

前端 未结 2 1970
独厮守ぢ
独厮守ぢ 2021-01-26 23:07

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

2条回答
  •  無奈伤痛
    2021-01-27 00:03

    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)
    

提交回复
热议问题