[erlang-bugs] Documentation error R12B
Kenneth Lundin
kenneth.lundin@REDACTED
Thu Mar 20 08:24:05 CET 2008
Hi,
Sorry but I can't find anything wrong with the doc here:
The fun passed as the first argument to lists:foldl indeed takes 2
arguments where
the first argument is the successive elements in the list and the second is the
accumulator.
/Kenneth Erlang/OTP team at Ericsson
On 3/19/08, DougEdmunds <dougedmunds@REDACTED> wrote:
> Error in
> .../Doc/programming_examples/funs.html, section 2.5.5 (foldl)
>
> The order of the arguments is wrong.
>
> Section 2.5.5 currently says:
>
>
> foldl takes a function of two arguments, an accumulator and a list. The
> function is called with two arguments. The first argument is the
> successive elements in the list, the second argument is the accumulator.
> The function must return a new accumulator which is used the next time
> the function is called.
>
> This paragraph should read:
>
> foldl takes a function of two arguments. The function is called with two
> arguments. The first argument is the accumulator, the second argument is
> the successive elements in the list. The function must return a new
> accumulator which is used the next time the function is called.
>
> ref:
> lists:foldl(Fun, Acc0, List) -> Acc1
>
> -dae
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-bugs
>
More information about the erlang-bugs
mailing list