cl-reduce doc fix
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Oct 2019 04:32:36 +0000 (06:32 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 7 Oct 2019 04:32:36 +0000 (06:32 +0200)
* lisp/emacs-lisp/cl-seq.el (cl-reduce): Clarify what happens when
SEQ is the empty list (bug#37400).

lisp/emacs-lisp/cl-seq.el

index a15c994bc1a1843de1c21fca655ffcca3f0c8f8a..520d450481f7de5739bf061818211a0658244f9c 100644 (file)
@@ -133,6 +133,11 @@ If :INITIAL-VALUE is specified, it is added to the front of SEQ.
 If SEQ is empty, return :INITIAL-VALUE and FUNCTION is not
 called.
 
+If SEQ is empty and no :INITIAL-VALUE is given, then the function
+is called with zero arguments, and reduce returns whatever
+function does. This is the only case where the function is called
+with other than two arguments.
+
 \n(fn FUNCTION SEQ [KEYWORD VALUE]...)"
   (cl--parsing-keywords (:from-end (:start 0) :end :initial-value :key) ()
     (or (listp cl-seq) (setq cl-seq (append cl-seq nil)))