
1 Feb
2010
1 Feb
'10
8:32 a.m.
Hi Gabi Furthermore, a bit of rewriting might make a better explanation. Ignoring the seq, the right-hand side is: fn (x:xs) = x + fn xs Although the recursive step is the rightmost part, (fn xs) must return back to (x + ...) to perform the summing. If the arguments are swapped, the function is the same but the recursive step is obviously not in the tail position: fn (x:xs) = (fn xs) + x Best wishes Stephen