Use DrRacket to view course notes, assignments, and labs only. May not use the Stepper or hit the Run button

Cumulative, but with emphasis on topics we've covered since the last midterm

Understanding abstraction and higher order functions in general will be important

Understanding the last two labs, more specifically, will be important

Budget your time: 100 points / 100 minutes

Points for each question will be indicated. Between 20-30 points (minutes) for each question

Exam period is 2 hours (120 minutes), so you should have more time than you need.

**Q1:** writing functions for trees. I give you the data definition(s) and a sketch of a tree, you translate the tree into data example(s). Then write a function that consumes a tree based on given data definition.

**Q2:** abstracting over two functions, parameterizing, and designing a new higher order function. Then use the new function to rewrite the two original functions. Like we did with +, *, and foldr.

**Q3:** using higher order functions to gradually simplify your the design of a function. Stages:

define top-level function

define a new function that passes the previous top-level function to map, fold, or filter

revise the last function to use a local expression

replace the local expression with an anonymous (lambda) function

**Q4:** using and evaluating higher order functions: filter, map, foldr, andmap, ormap