Common Lisp: How to check the established equality, ignoring the order?

Similar to this question:

Setting up a generic lisp function using only "eq"

except, I would like to compare two sets for equality, regardless of order. How can I do it?

+7
source share
2 answers

The CL has a number of predefined functions. Among them, you can use (null (set-exclusive-or set-a set-b)) .

+6
source

This may not be the answer you are looking for, but if you want to deal with sets, I recommend using Fset , a library of function sets of theoretical sets for CL. The tutorial gives a good idea of ​​what it does.

0
source

All Articles