diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-15 09:37:44 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2020-10-15 09:37:44 +0200 |
commit | ace25f206640b94d876d7d0966fcd9e512f81fc9 (patch) | |
tree | 5c1fe964f48dd7cd7a14c84c7139733255f3d8b9 /lisp/emacs-lisp/seq.el | |
parent | 7d598e281d15522b64a8807e6805e715c581f12f (diff) | |
download | emacs-ace25f206640b94d876d7d0966fcd9e512f81fc9.tar.gz emacs-ace25f206640b94d876d7d0966fcd9e512f81fc9.tar.bz2 emacs-ace25f206640b94d876d7d0966fcd9e512f81fc9.zip |
Clarify the seq-reduce documentation
* doc/lispref/sequences.texi (Sequence Functions): Ditto.
* lisp/emacs-lisp/seq.el (seq-reduce): Clarify the order of the
arguments (bug#43995).
Diffstat (limited to 'lisp/emacs-lisp/seq.el')
-rw-r--r-- | lisp/emacs-lisp/seq.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index e3037a71901..42b145da2fd 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -336,9 +336,11 @@ list." "Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE. Return the result of calling FUNCTION with INITIAL-VALUE and the -first element of SEQUENCE, then calling FUNCTION with that result and -the second element of SEQUENCE, then with that result and the third -element of SEQUENCE, etc. +first element of SEQUENCE, then calling FUNCTION with that result +and the second element of SEQUENCE, then with that result and the +third element of SEQUENCE, etc. FUNCTION will be called with +INITIAL-VALUE (and then the accumulated value) as the first +argument, and the elements from SEQUENCE as the second argument. If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called." (if (seq-empty-p sequence) |