CIS 352 — SPRING 2009
Exam 1: Scope and Practice
When, Where, and How
- When: Tuesday, February 17
- Where: in class
- How: Closed book, closed notes.
Coverage
Through Chapter 2 of Dybvig and Chapters 1 and 2 of EOPL.
You should be familiar with the following:
- Procedures and related things
-
- anonymous procedure
- higher-order procedure
- variable-arity procedure
- BNF specification
- first-class values
- special form (*)
You should be familiar with (and able to use) the following Scheme
procedures and special forms.
- Common predicates
-
-
boolean?
-
eq?
-
equal?
-
eqv?
-
list?
-
not
-
null?
-
number?
-
pair?
-
procedure?
-
symbol?
-
zero?
- List-related procedures
-
-
append
-
car and
cdr (along with cadr,
cdar, …)
-
cons
-
length
-
list
- Higher-order procedures
-
- Special forms
-
-
and
-
or
-
cond
-
define
-
lambda
(and its use for variable-arity procedures)
-
let
-
letrec
-
if
-
quote (also ')
- Miscellaneous
-
-
=
-
+
-
*
-
/
-
<
-
<=
-
>
-
>=
-
memq
-
memv
-
member
You should be prepared for the following kinds of questions:
- Write a Scheme procedure to do X, where
X involves one or more of the following:
- manipulating lists
- recursion on inductively defined structures
- recursion on lists
- recursion on nested lists (i.e., you have to recurse on elements of
lists as well)
- accepting procedures as arguments
- returning a procedure as a result
- accepting an arbitrary number of arguments
What are the values of the following expressions?
Consider the following BNF specification for <banf>.
- Are the following expressions members of <banf>?
- Write a Scheme procedure that takes an element
of <banf> and does X.
Practice
- Last year's Exam 1
with sample solutions.
Note: This year we have not talked much yet about
variable scoping and free and bound variables. You will
not have questions about these topics on this exam.
Back to the CIS 352 Homepage
Jim Royer /