Table of Contents
Chapter 6. Operations on Objects
Section 6.3. Lists and Pairs...........................................................................................................124
Section 6.4. Numbers....................................................................................................................133
Section 6.5. Fixnums.....................................................................................................................152
Section 6.6. Flonums.....................................................................................................................160
Section 6.7. Characters..................................................................................................................167
Section 6.8. Strings........................................................................................................................170
Section 6.9. Vectors.......................................................................................................................176
Section 6.10. Bytevectors..............................................................................................................179
Section 6.11. Symbols...................................................................................................................189
Section 6.12. Booleans..................................................................................................................191
Section 6.13. Hashtables...............................................................................................................191
Section 6.14. Enumerations...........................................................................................................196
Chapter 7. Input and Output.........................................................................................................................201
Section 7.1. Transcoders......................................................................................................................202
Section 7.2. Opening Files............................................................................................................203
Section 7.3. Standard Ports............................................................................................................205
Section 7.4. String and Bytevector Ports.......................................................................................206
Section 7.5. Opening Custom Ports...............................................................................................208
Section 7.6. Port Operations..........................................................................................................210
Section 7.7. Input Operations........................................................................................................212
Section 7.8. Output Operations.....................................................................................................216
Section 7.9. Convenience I/O........................................................................................................217
Section 7.10. Filesystem Operations.............................................................................................221
Section 7.11. Bytevector/String Conversions................................................................................222
Chapter 8. Syntactic Extension......................................................................................................................225
Section 8.1. Keyword Bindings...........................................................................................................225
Section 8.2. Syntax-Rules Transformers.......................................................................................227
Section 8.3. Syntax-Case Transformers........................................................................................230
Section 8.4. Examples...................................................................................................................240
Chapter 9. Records.........................................................................................................................................249
Section 9.1. Defining Records.............................................................................................................249
Section 9.2. Procedural Interface..................................................................................................255
Section 9.3. Inspection..................................................................................................................258
Chapter 10. Libraries and Top-Level Programs.........................................................................................263
Section 10.1. Standard Libraries..........................................................................................................263
Section 10.2. Defining New Libraries...........................................................................................264
Section 10.3. Top-Level Programs................................................................................................268
Section 10.4. Examples.................................................................................................................269
Chapter 11. Exceptions and Conditions........................................................................................................273
Section 11.1. Raising and Handling Exceptions..................................................................................273
Section 11.2. Defining Condition Types.......................................................................................276
Section 11.3. Standard Condition Types.......................................................................................279
Chapter 12. Extended Examples...................................................................................................................289
Section 12.1. Matrix and Vector Multiplication..................................................................................289
Exercise 12.1.1..............................................................................................................................293
The Scheme Programming Language, 4th Edition
ii