I have been learning scheme and I like to know the difference between the two. Thanks.
+3
A:
Accumulative recursion uses an extra parameter in which we collect new information as we go deeper into the recursion. The computed value is returned unchanged back up through the layers of recursion.
Structural recursion performs much of the work on the way back up through the layers of recursion.Accumulative recursion is often more efficient than stack recursion.
Aaron M
2009-09-16 14:46:20
so Accumulative recursion is like iteration? And is the extra parameter usually called a state variable?
Mark
2009-09-16 23:48:52
That extra parameter is called the accumulator.
Aaron M
2009-09-17 14:01:00