The Schema Programming Language: 4th Edition
Scheme was introduced in 1975 by Gerald J. Sussman and Guy L. Steele Jr., and was the first dialect of Lisp to fully support lexical scoping, first-class procedures, and continuations. In its earliest form it was a small language intended primarily for research and teaching, supporting only a handful of predefined syntactic forms and procedures. Scheme is now a complete general-purpose programming language, though it still derives its power from a small set of key concepts. Early implementations of the language were interpreter-based and slow, but some current Scheme implementations boast sophisticated compilers that generate code on par with code generated by the best optimizing compilers for lower-level languages such as C and Fortran.
This book is intended to provide an introduction to the Scheme programming language but not an introduction to programming in general. The reader is expected to have had some experience programming and to be familiar with terms commonly associated with computers and programming languages. Readers unfamiliar with Scheme or Lisp should also consider reading The Little Schemer to become familiar with the concepts of list processing and recursion. Readers new to programming should begin with an introductory text on programming.
This book covers the language of the Revised Report. It is not intended to supplant the Revised Report but rather to provide a more comprehensive introduction and reference manual for the language, with more explanatory text and examples, suitable more for users than for implementors. Features specific to particular implementations of Scheme are not included. In particular, features specific to the author’s Chez Scheme and Petite Chez Scheme implementations are described separately in the Chez Scheme User’s Guide. On the other hand, no book on Scheme would be complete without some coverage of the interactive top level, since nearly every Scheme system supports interactive use in one form or another, even though the behavior is not standardized by the Revised Report. Chapters 2 and 3 are thus written assuming that the reader has available a Scheme implementation that supports an interactive top level, with behavior consistent with the description of the top-level environment in earlier reports and the IEEE/ANSI standard.
This book is organized into twelve chapters, plus back matter.
- Chapter 1 describes the properties and features of Scheme that make it a useful and enjoyable language to use. This chapter also describes Scheme’s notational conventions and the typographical conventions employed in this book.
- Chapter 2 is an introduction to Scheme programming for the novice Scheme programmer that leads the reader through a series of examples.
- Chapter 3 continues the introduction but covers more advanced features and concepts.
- Chapter 4 describes operations for creating procedures and variable bindings.
- Chapter 5 program control operations.
- Chapter 6 operations on the various object types (including lists, numbers, and strings).
- Chapter 7 input and output operations.
- Chapter 8 syntactic extension.
- Chapter 9 record-type definitions.
- Chapter 10 libraries and top-level programs.
- Chapter 11 exceptions and conditions.
- Chapter 12 contains a collection of example procedures, libraries, and programs, each with a short overview, some examples of its use, the implementation with brief explanation, and a set of exercises for further work.