bug-gnu-emacs
[Top][All Lists]
Advanced

[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: John Mastro
Subject: bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality
Date: Tue, 18 Apr 2017 13:13:46 -0700

Damien Cassou <address@hidden> wrote:
>
> This patch adds cl-seq-equal to test whether two lists have the same
> elements. I.e., if every element of LIST1 also appears in LIST2 and if every
> element of LIST2 also appears in LIST1.

This is admittedly bikeshedding, for which I apologize, but I'd like to
mention the possibility of adding this to `seq' as an alternative to
adding it to `cl-lib'.

My two arguments for adding it to `seq' are:
  - This function doesn't exist in Common Lisp, so `cl-lib' seems like
    a somewhat arbitrary place for it, other than that its
    implementation uses `cl-set-exclusive-or'.
  - It could use seq.el's type dispatch

As a downside, (besides the fact that the patch adding it to `cl-lib' is
already available), `seq' doesn't have a direct equivalent to
`cl-set-exclusive-or', so adding it to `seq' is more work.

        John





reply via email to

[Prev in Thread] Current Thread [Next in Thread]