The foldr example expansion is done incorrectly on the “if” lines. For instance,
foldlr (+) 0 [3] =
if null [1,2,3] then 0
The second line should read:
if null [3] then 0
All of the if-lines in this example except the first one are wrong.
The foldr example expansion is done incorrectly on the “if” lines. For instance,
foldlr (+) 0 [3] =
if null [1,2,3] then 0
The second line should read:
if null [3] then 0
All of the if-lines in this example except the first one are wrong.