bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24014: 24.5; doc string of `cl-reduce'


From: Stefan Kangas
Subject: bug#24014: 24.5; doc string of `cl-reduce'
Date: Sat, 23 Oct 2021 10:32:31 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

close 24014 28.1
thanks

Drew Adams <drew.adams@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]