Lab: Tail and helper recursion
- Assigned
- Friday, 30 October 2026
- Writeup due
- Monday, 2 November 2026
- Summary
- In this laboratory, you will explore recursive procedures
in which we pass along intermediate computations, most typically
using a recursive helper procedure. When this technique is used in
conjunction with a program structure in which the recursive result
is returned directly (without accumulated actions to perform), this
technique supports tail recursion.
In this lab, we’ll further expand our understanding of recursion, considering how patterns of recursion and helper procedures improve our ability to recurse.
Preparation
a. Introduce yourself to your partner, discuss strengths and weaknesses, work work procedures, and such.
b. Go over your answers to the self checks.
c. Grab the code.
Acknowledgements
This lab was significantly rewritten in Fall 2026. Before that, it had the last significant rewrite in Fall 2021.