From f0b71429b9fbfb5dc5a561321de42a39fc176809 Mon Sep 17 00:00:00 2001 From: Nicolas Petton Date: Mon, 28 Sep 2015 21:11:05 +0200 Subject: Better documentation for seq-some * doc/lispref/sequences.texi: * lisp/emacs-lisp/seq.el: Update the documentation of seq-some to guarantee that the returned value is the first non-nil value that resulted from applying the predicate. --- lisp/emacs-lisp/seq.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index e0f17c0335d..a63447d3243 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -261,8 +261,7 @@ If SEQ is empty, return INITIAL-VALUE and FUNCTION is not called." t)) (cl-defgeneric seq-some (pred seq) - "Return non-nil if (PRED element) is non-nil for any element in SEQ, nil otherwise. -If so, return the non-nil value returned by PRED." + "Return the first value for which if (PRED element) is non-nil for in SEQ." (catch 'seq--break (seq-doseq (elt seq) (let ((result (funcall pred elt))) -- cgit v1.2.3