Functional Problem Solving (CSC 151 2014F) : EBoards

CSC151.01 2014F, Class 25: Recursion Basics, Continued


Overview

Preliminaries

Admin

Upcoming Work

Cool Things Coming to Campus

Extra Credit Opportunities

Academic

Peer Support

Miscellaneous

Exam Advice

Some good comments on doing well on the exam (from exam 1 epilogues and exam 2 prologues).

Questions

Can we use car and cdr on the exam?

Yes, but I don't think they'll be useful.

Can we use recursion on the exam?

Yes, except on problems in which it is explicitly forbidden, such as problem 5. Recursion will also lead to a longer solution to problem 4 than we'd like.

The exam does not need recursion.

Quiz

Lab

Is it really okay that (product null) is 1?

Yes. We were okay that (sum null) is 0. 0 is the additive identity and 1 is the multiplicative identity.

Can I make the base case test in product something like "if there is one element in the list?"

Yes. You'd use the following pattern

    (if (null? (cdr numbers))
        CONSEQUENT
        ALTERNATE)

Reflection