Function: seq-set-equal-p
seq-set-equal-p is a byte-compiled function defined in seq.el.gz.
Signature
(seq-set-equal-p SEQUENCE1 SEQUENCE2 &optional TESTFN)
Documentation
Return non-nil if SEQUENCE1 and SEQUENCE2 contain the same elements.
The order of the elements in the sequences is not important.
"Equality" of elements is defined by the function TESTFN, which
defaults to equal.
Other relevant functions are documented in the sequence group.
Probably introduced at or before Emacs version 26.1.
Shortdoc
;; sequence
(seq-set-equal-p '(1 2 3) '(3 1 2))
=> t
Implementations
(seq-set-equal-p SEQUENCE1 SEQUENCE2 &optional TESTFN) in `seq.el'.
Undocumented
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/seq.el.gz
(cl-defgeneric seq-set-equal-p (sequence1 sequence2 &optional testfn)
"Return non-nil if SEQUENCE1 and SEQUENCE2 contain the same elements.
The order of the elements in the sequences is not important.
\"Equality\" of elements is defined by the function TESTFN, which
defaults to `equal'."
(and (seq-every-p (lambda (item1) (seq-contains-p sequence2 item1 testfn)) sequence1)
(seq-every-p (lambda (item2) (seq-contains-p sequence1 item2 testfn)) sequence2)))