[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24014: 24.5; doc string of `cl-reduce'
From: |
Drew Adams |
Subject: |
bug#24014: 24.5; doc string of `cl-reduce' |
Date: |
Sun, 17 Jul 2016 21:44:50 -0700 (PDT) |
> >> 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.