CS 135 Winter 2011
Wed., March 23, 2011, 9:30am
Intermediate Student with Lambda
Files to submit:
HtDP 19.1.5, 20.1.1, 20.1.2, 24.0.7, 24.0.8,
Without using explici t
HtDP 19.1.6, 20.1.3, 21.2.3, 24.0.9, 20.2.4, 24.3.1, 24.3.2
For this assignment:
you may use the abstract list functions in Table 57 of the textbook (
you may use primitive functions such as mathematical functions,
and similar “non-primitive” functions unless ex-
use explicit recursion (functions that call themselves, either directly or indi-
rectly) except in the construction of requested abstract list functions.
Nesting abstract list functions can become confusing. Use appropriately documen ted helper func-
tions liberally to help clarify your intentions.
Here are the assignment questions you need to submit.
1. The stepping problems for Assignment 8 at
2. Construct the following functions using abstract list functions. Do
use explicit recursion
(no credit will be given for explicitly recursive solutions):
(a) The function
, which consumes a list of
s, and produces the list of all of
the x-coordinates of the
s in the given list.
(b) The function
, which consumes a list of anything at all, and produces
the list of all of the x-coordinates of the
s in the list.
(c) The function
, which consumes a list of numbers (
list a1 a2
. . .
produces the alternating sum
CS 135 — Winter 2011