Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Common Lisp: How to check set equality, ignoring order?

Similar to this question:

Setting up a equal function in common lisp using only "eq"

except, I'd like to be compare two sets for equality, disregarding order. How would I do this?

like image 545
Sandy Avatar asked Feb 12 '11 01:02

Sandy


1 Answers

There are a number of set functions in CL. Among those you can use (null (set-exclusive-or set-a set-b)).

like image 87
Vsevolod Dyomkin Avatar answered Oct 23 '22 11:10

Vsevolod Dyomkin