summaryrefslogtreecommitdiff
path: root/doc/lispref/sequences.texi
diff options
context:
space:
mode:
authorNicolas Petton <nicolas@petton.fr>2015-09-28 21:11:05 +0200
committerNicolas Petton <nicolas@petton.fr>2015-09-28 21:15:58 +0200
commitf0b71429b9fbfb5dc5a561321de42a39fc176809 (patch)
tree221fcf3f39fb586596838b69517c60ab7be19563 /doc/lispref/sequences.texi
parent5526561b0c8416cbae492bc246eacd30f7b1daa8 (diff)
downloademacs-f0b71429b9fbfb5dc5a561321de42a39fc176809.tar.gz
emacs-f0b71429b9fbfb5dc5a561321de42a39fc176809.tar.bz2
emacs-f0b71429b9fbfb5dc5a561321de42a39fc176809.zip
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.
Diffstat (limited to 'doc/lispref/sequences.texi')
-rw-r--r--doc/lispref/sequences.texi9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index b85d5d4c1b1..2dc494aec5d 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -558,9 +558,8 @@ calling @var{function}.
@end defun
@defun seq-some predicate sequence
- This function returns non-@code{nil} if @var{predicate} returns
-non-@code{nil} for any element of @var{sequence}. If so, the returned
-value is the value returned by @var{predicate}.
+ This function returns the first non-@code{nil} value returned by
+applying @var{predicate} to each element of @var{sequence} in turn.
@example
@group
@@ -575,6 +574,10 @@ value is the value returned by @var{predicate}.
(seq-some #'null ["abc" 1 nil])
@result{} t
@end group
+@group
+(seq-some #'1+ [2 4 6])
+@result{} 3
+@end group
@end example
@end defun