[erlang-bugs] Documentation error R12B

DougEdmunds dougedmunds@REDACTED
Wed Mar 19 22:16:05 CET 2008


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



More information about the erlang-bugs mailing list