Class 22 Objectives
At the end of today's class you should
KNOW:
- That accumulator-style functions can be more efficient than the
kinds of recursive functions we have written so far.
- That accumulator-style programming is the style of programming used in
many other programming languages.
BE ABLE TO:
- Convert a Racket program to a program that accomplishes the same
task "accumulator-style".
Sample Exam Question:
Use the data definitions and function descriptions we developed for an inventory of long-playing records (see the extra problems from Thursday's class) to re-write the function
titles-in-stock
. Your rewritten version should use
accumulator-style programming.