Naturally we can't address all problems that might arise with an arbitrary Scheme implementation. Thus, we would suggest that students working on their own would be best off using one of the Scheme implementations we specifically support. However, course instructors who are familiar with a particular Scheme implementation might prefer to use that implementation. To help those instructors, we provide here some sample code that can serve as a starting point for developing a compatability library. You should also read the Appendix of the book, which points out those areas where compatability problems are likely to arise.
error
, which is assumed in
the book (from chapter 6 onward) and also by the following two files.
Check whether you really need this; many Scheme systems do provide
error. Even if you do need this, you may be able to improve on the
way it aborts execution after the error is reported.
random
,
which is used in chapters 6, 11, and 14.
save-image-as-epsf
procedure which can be used to save
an image out into an Encapsulated PostScript file. You would then
need to use system-specific means to view or print that file.
length
list-ref
list-tail
map
reverse
gcd
(newline)
newline
procedure to
break output into separate lines. Unfortunately, there are two
different conventions in use by different Scheme systems. One is to
always use newline
at the start of each line of output,
while the other is to always use it at the end of each line. As a
result of this lack of standardization, wherever we positioned the
uses of (newline)
in our programs would result in output
that looked odd on some systems. We've tried in the textbook to make
choices that don't look too horrible on any system, with the result
that the output tends to look sub-optimal on every system. In
particular, there tends to be extra blank lines. If you are working
consistently within one system, feel free to
remove or reposition (newline)
as necessary to make the
output look best.
rcross-bb
, are
neither pre-defined nor defined within the library. Instead, their
definitions are in a separate file.