You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Instructions for students & labbies:

Students use DrScheme, following the design recipe,
on the exercises at their own pace,
while labbies wander among the students, answering questions,
bringing the more important ones to the lab's attention.

Quick Review of Scope

A function definition
introduces a new local scope -- the parameters are defined within the
body.

(define (parameters …)
body)

A local definition
introduces a new local scope -- the names in the definitions are defined
within both within the bodies of the definitions and within the
local's body.

(local [definitions …]
body)

Note that the use of square brackets

[ ]

here is equivalent
to parentheses

( )

. The brackets help set off the definitions
a little more clearly for readability.