This is the so-called recursive style:

And this is the so-called iterative style:

It seems like it is defined recursively to me. The function doesn't hide the next call of the function defined in it at all.

(SICP 95)

  • $\begingroup$ It seems a programming question. Both definitions are recursive.loop is used for creating iterations. $\endgroup$ – fade2black Nov 2 '17 at 6:57
  • 3
    $\begingroup$ Don't use images as main content of your post. This makes your question impossible to search and inaccessible to the visually impaired; we don't like that. Please transcribe text and mathematics (note that you can use LaTeX) and don't forget to give proper attribution to your sources! $\endgroup$ – Raphael Nov 2 '17 at 9:14
  • $\begingroup$ Agreed. I'd call the two variants top-down and bottom-up recursion. $\endgroup$ – Raphael Nov 2 '17 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.