GNU bug report logs - #24014
24.5; doc string of `cl-reduce'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 17 Jul 2016 14:56:01 UTC

Severity: minor

Found in version 24.5

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 24014 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 Nicolas Petton <nicolas <at> petton.fr>, 24014 <at> debbugs.gnu.org
Subject: Re: bug#24014: 24.5; doc string of `cl-reduce'
Date: Sat, 23 Oct 2021 10:32:31 -0700
close 24014 28.1
thanks

Drew Adams <drew.adams <at> oracle.com> writes:

>> >> Please state in the doc string what the function does.  IOW,
>> >> explain/describe/specify what "reduce" means.  Do not suppose that Emacs
>> >> Lisp users are all familiar with functional programming etc.
>>
>> The documentation of `seq-reduce' is probably not perfect, but at least
>> it tries to explain what reducing means:
>>
>>     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.
>>
>>     If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called.
>
> Much better, yes.  This is the right level at which to describe what
> it does for most programmers, IMO.

Nicolas updated the docstring, and I have now done the same change in
cl.texi on the emacs-28 branch (commit 43914ab01f).

It is the same text as above, just formatted for texinfo, so it should
be understandable to us mere programmers.

I'm consequently closing this bug report.




This bug report was last modified 3 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.