[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality
From: |
Damien Cassou |
Subject: |
bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality |
Date: |
Tue, 18 Apr 2017 16:40:19 +0200 |
Drew Adams <drew.adams@oracle.com> writes:
I'm just pointing out that a function we already have, and one
that is used more widely by users of Common Lisp, does the same
thing - unless I'm missing something.
I agree (except that one has opposite result).
If people think that some users might not think to use
`set-exclusive-or' to test set equality then we could add a
`set-equal' function. Common Lisp didn't think so, and neither
do I, but I wouldn't oppose adding it.
At least I didn't think about using exclusive-or. Searching for
"equal" or "same elements" in the info page (info "(cl) Lists as
Sets") didn't help.
If we do add it, I'd imagine that the implementation should be
the same (adding `not', as you say), for clarity and consistency
- unless other things are not equal for some reason (i.e.,
unless there is a good reason not to use the existing
implementation).
I updated the patch.
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
0001-Add-cl-set-equal-to-test-for-set-equality.patch
Description: Text Data
bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality, John Mastro, 2017/04/18