home—info—lectures—exams—archive
scheme-resources
ITEC380 Scheme resources
Running Scheme
-
If you have your own computer,
you can download
DrScheme.
-
Currently, DrScheme is not installed on campus lab machines :-(
Let me know if you don't have a machine on which you can
download/install your own version,
and we'll find some solution.
-
The first time you start DrScheme,
set the language to “Advanced Student”.
Learning scheme
-
Teach
Yourself Scheme in Fixnum Days is geared for
people who already know programming, and is a good concise overview
(but it mixes advanced and introductory concepts side-by-side).
-
How to Design Programs is
aimed at the beginner.
It uses Scheme, although really it is teaching
a fundamental design methodology
which is helpful.
(I worked through this book after finishing my Ph.D. in
computer science,
and it transformed my idea of good programming.)
-
§15.5 of the textbook.
Note that everything the book uses in all-caps
(such as “DEFINE”)
should actually be written
in lower-case (e.g. “define”).
See also the differences-in-dialects table below.
-
Within DrScheme, the Helpdesk menu-item is helpful.
Also, if cursor is on a name1, pressing F1 will
show the built-in documentation for that name.
-
Use check-expect for exact answers,
and check-within
for inexact numbers.
(check-within is just like check-expect
but it takes a third input -- the tolerance, e.g. 0.0001.)
Differences in dialects:
old-school2
|
DrScheme |
car |
first |
cdr |
rest |
null, nil |
empty |
null? |
empty? |
nil |
false, #f |
t |
true, #t |
-
For this course,
the following functions are not allowed:
set!, set-car!, set-cdr!,
(or set-first!, set-rest!),
and any of the set-struct-field!
mutators.
1That is, if the caret is
actually in the name; merely hovering the mouse over the name
won't work. ↩
2Some of these are older
Scheme names which have been improved;
most are also Common Lisp names which just aren't
quite idiomatic for Scheme.
↩
home—info—lectures—exams—archive