(seq-contains-p): Refine the non-nil returned value
* lisp/emacs-lisp/seq.el (seq-contains-p): Like `cl-some` return the value returned by the test function rather than t.
This commit is contained in:
@@ -418,8 +418,9 @@ Equality is defined by TESTFN if non-nil or by `equal' if nil."
|
||||
Equality is defined by TESTFN if non-nil or by `equal' if nil."
|
||||
(catch 'seq--break
|
||||
(seq-doseq (e sequence)
|
||||
(when (funcall (or testfn #'equal) e elt)
|
||||
(throw 'seq--break t)))
|
||||
(let ((r (funcall (or testfn #'equal) e elt)))
|
||||
(when r
|
||||
(throw 'seq--break r))))
|
||||
nil))
|
||||
|
||||
(cl-defgeneric seq-set-equal-p (sequence1 sequence2 &optional testfn)
|
||||
|
||||
Reference in New Issue
Block a user