Appendix A

Appendix A - Teach Yourself Scheme in Fixnum Days [Go to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Teach Yourself Scheme in Fixnum Days [Go to first , previous , next page; contents ; index ] Appendix A Scheme dialects All major Scheme dialects implement the R5RS specification [ 23 ]. By using only the features documented in the R5RS, one can write Scheme code that is portable across the dialects. However, the R5RS, either for want of consensus or because of inevitable system dependencies, remains silent on several matters that non-trivial programming cannot ignore. The various dialects have therefore had to solve these matters in a non-standard and idiosyncratic manner. This book uses the MzScheme [ 9 ] dialect of Scheme, and thereby uses several features that are nonstandard. The complete list of the dialect-dependent features used in this book is: the command-line (both for opening a listener session and for shell scripts), define-macro , delete-file , file- exists? , file-or-directory-modify-seconds , fluid-let , gensym , getenv , get- output-string , load-relative , open-input-string , open-output-string , read- line , reverse! , system , unless and when . All but two of these are present in the default environment of MzScheme. The missing two, define- macro and system , are provided in standard MzScheme libraries, which can be explicitly loaded into MzScheme using the forms: (require (lib "defmacro.ss")) ;provides define-macro (require (lib "process.ss")) ;provides system A good place to place these forms is the MzScheme initialization file (or init file ), which, on Unix, is the file .mzschemerc in the user's home directory. 11 Some of the nonstandard features (eg, file-exists? , delete-file ) are in fact de facto standards and are present in many Schemes. Some other features (eg, when , unless ) have more or less ``plug- in'' definitions (given in this book) that can be loaded into any Scheme dialect that doesn't have them
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Appendix A - Teach Yourself Scheme in Fixnum Days [Go to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online