1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

* lisp/emacs-lisp/seq.el (seq-difference): Inverse a conditional for clarity.

This commit is contained in:
Nicolas Petton 2019-03-21 21:07:55 +01:00
parent 287cc58f39
commit 40714862a3
No known key found for this signature in database
GPG key ID: E8BCD7866AFCF978

View file

@ -430,9 +430,9 @@ Equality is defined by TESTFN if non-nil or by `equal' if nil."
"Return a list of the elements that appear in SEQUENCE1 but not in SEQUENCE2.
Equality is defined by TESTFN if non-nil or by `equal' if nil."
(seq-reduce (lambda (acc elt)
(if (not (seq-contains-p sequence2 elt testfn))
(cons elt acc)
acc))
(if (seq-contains-p sequence2 elt testfn)
acc
(cons elt acc)))
(seq-reverse sequence1)
'()))