[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4f02ecf: Update seq.el to 2.20
From: |
Nicolas Petton |
Subject: |
[elpa] master 4f02ecf: Update seq.el to 2.20 |
Date: |
Thu, 4 May 2017 05:38:06 -0400 (EDT) |
branch: master
commit 4f02ecf62d213dad54ec1633d9a5f1f9d6c8e8ab
Author: Nicolas Petton <address@hidden>
Commit: Nicolas Petton <address@hidden>
Update seq.el to 2.20
---
packages/seq/seq-24.el | 6 ++++++
packages/seq/seq-25.el | 6 ++++++
packages/seq/seq.el | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/packages/seq/seq-24.el b/packages/seq/seq-24.el
index 89c70a6..d7ea729 100644
--- a/packages/seq/seq-24.el
+++ b/packages/seq/seq-24.el
@@ -219,6 +219,12 @@ Equality is defined by TESTFN if non-nil or by `equal' if
nil."
(funcall (or testfn #'equal) elt e))
sequence))
+(defun seq-set-equal-p (sequence1 sequence2 &optional testfn)
+ "Return non-nil if SEQUENCE1 and SEQUENCE2 contain the same elements,
regardless of order.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+ (and (seq-every-p (lambda (item1) (seq-contains sequence2 item1 testfn))
sequence1)
+ (seq-every-p (lambda (item2) (seq-contains sequence1 item2 testfn))
sequence2)))
+
(defun seq-position (sequence elt &optional testfn)
"Return the index of the first element in SEQUENCE that is equal to ELT.
Equality is defined by TESTFN if non-nil or by `equal' if nil."
diff --git a/packages/seq/seq-25.el b/packages/seq/seq-25.el
index d503be8..d26bde6 100644
--- a/packages/seq/seq-25.el
+++ b/packages/seq/seq-25.el
@@ -346,6 +346,12 @@ Equality is defined by TESTFN if non-nil or by `equal' if
nil."
(funcall (or testfn #'equal) elt e))
sequence))
+(cl-defgeneric seq-set-equal-p (sequence1 sequence2 &optional testfn)
+ "Return non-nil if SEQUENCE1 and SEQUENCE2 contain the same elements,
regardless of order.
+Equality is defined by TESTFN if non-nil or by `equal' if nil."
+ (and (seq-every-p (lambda (item1) (seq-contains sequence2 item1 testfn))
sequence1)
+ (seq-every-p (lambda (item2) (seq-contains sequence1 item2 testfn))
sequence2)))
+
(cl-defgeneric seq-position (sequence elt &optional testfn)
"Return the index of the first element in SEQUENCE that is equal to ELT.
Equality is defined by TESTFN if non-nil or by `equal' if nil."
diff --git a/packages/seq/seq.el b/packages/seq/seq.el
index 6bbb307..83d4392 100644
--- a/packages/seq/seq.el
+++ b/packages/seq/seq.el
@@ -4,7 +4,7 @@
;; Author: Nicolas Petton <address@hidden>
;; Keywords: sequences
-;; Version: 2.19
+;; Version: 2.20
;; Package: seq
;; Maintainer: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] master 4f02ecf: Update seq.el to 2.20,
Nicolas Petton <=