内容简介
Scheme is a general-purpose programming language, descended from Algol and Lisp, widely used in computing education and research and a broad range of industrial applications. This thoroughly updated edition of The Scheme Programming Language provides an introduction to Scheme and a definitive reference for standard Scheme, presented in a clear and concise manner. Written for professionals and students with some prior programming experience, it begins by leading the programmer gently through the basics of Scheme and continues with an introduction to some of the more advanced features of the language.
The fourth edition has been substantially revised and expanded to bring the content up to date with the current Scheme standard, the Revised6 Report on Scheme. All parts of the book were updated and three new chapters were added, covering the language’s new library, exception handling, and record-definition features.
The book offers three chapters of introductory material with numerous examples, eight chapters of reference material, and one chapter of extended examples and additional exercises. All of the examples can be entered directly from the keyboard into an interactive Scheme session. Answers to many of the exercises, a complete formal syntax of Scheme, and a summary of forms and procedures are provided in appendixes.
The Scheme Programming Language is the only book available that serves both as an introductory text in a variety of courses and as an essential reference for Scheme programmers.
目录
Table of Contents Preface Chapter 1. Introduction Section 1.1. Scheme Syntax Section 1.2. Scheme Naming Conventions Section 1.3. Typographical and Notational Conventions Chapter 2. Getting Started Section 2.1. Interacting with Scheme Section 2.2. Simple Expressions Section 2.3. Evaluating Scheme Expressions Section 2.4. Variables and Let Expressions Section 2.5. Lambda Expressions Section 2.6. Top-Level Definitions Section 2.7. Conditional Expressions Section 2.8. Simple Recursion Section 2.9. Assignment Chapter 3. Going Further Section 3.1. Syntactic Extension Section 3.2. More Recursion Section 3.3. Continuations Section 3.4. Continuation Passing Style Section 3.5. Internal Definitions Section 3.6. Libraries Chapter 4. Procedures and Variable Bindings Section 4.1. Variable References Section 4.2. Lambda Section 4.3. Case-Lambda Section 4.4. Local Binding Section 4.5. Multiple Values Section 4.6. Variable Definitions Section 4.7. Assignment Chapter 5. Control Operations Section 5.1. Procedure Application Section 5.2. Sequencing Section 5.3. Conditionals Section 5.4. Recursion and Iteration Section 5.5. Mapping and Folding Section 5.6. Continuations Section 5.7. Delayed Evaluation Section 5.8. Multiple Values Section 5.9. Eval Chapter 6. Operations on Objects Section 6.1. Constants and Quotation Section 6.2. Generic Equivalence and Type Predicates Section 6.3. Lists and Pairs Section 6.4. Numbers Section 6.5. Fixnums Section 6.6. Flonums Section 6.7. Characters Section 6.8. Strings Section 6.9. Vectors Section 6.10. Bytevectors Section 6.11. Symbols Section 6.12. Booleans Section 6.13. Hashtables Section 6.14. Enumerations Chapter 7. Input and Output Section 7.1. Transcoders Section 7.2. Opening Files Section 7.3. Standard Ports Section 7.4. String and Bytevector Ports Section 7.5. Opening Custom Ports Section 7.6. Port Operations Section 7.7. Input Operations Section 7.8. Output Operations Section 7.9. Convenience I/O Section 7.10. Filesystem Operations Section 7.11. Bytevector/String Conversions Chapter 8. Syntactic Extension Section 8.1. Keyword Bindings Section 8.2. Syntax-Rules Transformers Section 8.3. Syntax-Case Transformers Section 8.4. Examples Chapter 9. Records Section 9.1. Defining Records Section 9.2. Procedural Interface Section 9.3. Inspection Chapter 10. Libraries and Top-Level Programs Section 10.1. Standard Libraries Section 10.2. Defining New Libraries Section 10.3. Top-Level Programs Section 10.4. Examples Chapter 11. Exceptions and Conditions Section 11.1. Raising and Handling Exceptions Section 11.2. Defining Condition Types Section 11.3. Standard Condition Types Chapter 12. Extended Examples Section 12.1. Matrix and Vector Multiplication Section 12.2. Sorting Section 12.3. A Set Constructor Section 12.4. Word Frequency Counting Section 12.5. Scheme Printer Section 12.6. Formatted Output Section 12.7. A Meta-Circular Interpreter for Scheme Section 12.8. Defining Abstract Objects Section 12.9. Fast Fourier Transform Section 12.10. A Unification Algorithm Section 12.11. Multitasking with Engines References Answers to Selected Exercises Formal Syntax Summary of Forms Index · · · · · · (收起)