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.
This commit is contained in:
Nicolas Petton 2015-09-28 21:11:05 +02:00
parent 5526561b0c
commit f0b71429b9
2 changed files with 7 additions and 5 deletions

View file

@ -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)))