unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicolas Petton <nicolas@petton.fr>
To: Damien Cassou <damien@cassou.me>,
	John Mastro <john.b.mastro@gmail.com>,
	26540@debbugs.gnu.org
Subject: bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality
Date: Wed, 19 Apr 2017 16:41:17 +0200	[thread overview]
Message-ID: <87r30oh33m.fsf@petton.fr> (raw)
In-Reply-To: <87tw5k8w4g.fsf@cassou.me>

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Damien Cassou <damien@cassou.me> writes:

> +(cl-defgeneric seq-set-equal (sequence1 sequence2 &optional testfn)
                  ^^^^^^^^^^^^^
                  What about `seq-set-equal-p'?

> +  "Return true if SEQUENCE1 and SEQUENCE2 have same elements.
             ^^^^
             We say non-nil
             
> +I.e., if every element of SEQUENCE1 also appears in SEQUENCE2 and if
> +every element of SEQUENCE2 also appears in SEQUENCE1.

What do you think about the following instead?

  Return non-nil if SEQUENCE1 and SEQUENCE2 contain the same elements,
  regardless of the order.

> diff --git a/test/lisp/emacs-lisp/seq-tests.el b/test/lisp/emacs-lisp/seq-tests.el
> index 788524b..9cc54d8 100644
> --- a/test/lisp/emacs-lisp/seq-tests.el
> +++ b/test/lisp/emacs-lisp/seq-tests.el

All your contributions are very well tested, thank you always taking the
effort to add unit tests! :-)

Cheers,
Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2017-04-19 14:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17  9:16 bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality Damien Cassou
2017-04-17 13:55 ` Drew Adams
2017-04-18 11:21   ` Damien Cassou
2017-04-18 14:00     ` Drew Adams
2017-04-18 14:40       ` Damien Cassou
2017-04-18 21:49         ` Drew Adams
2017-04-18 20:13 ` John Mastro
2017-04-18 21:53   ` Drew Adams
2017-04-19  9:39   ` Nicolas Petton
2017-04-19 10:43     ` Damien Cassou
2017-04-19 11:39       ` Damien Cassou
2017-04-19 14:41         ` Nicolas Petton [this message]
2017-05-03 13:02           ` Damien Cassou
2017-05-04  9:41             ` Nicolas Petton
2017-04-19 21:19         ` Michael Heerdegen
2017-05-03 13:12           ` Damien Cassou
2017-05-11 19:42             ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r30oh33m.fsf@petton.fr \
    --to=nicolas@petton.fr \
    --cc=26540@debbugs.gnu.org \
    --cc=damien@cassou.me \
    --cc=john.b.mastro@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).