The defacto standard - a must-have for all LISP programmers.
In this greatly expanded edition of the defacto standard, you'll learn about the nearly 200 changes already made since original publication - and find out about gray areas likely to be revised later. Written by the Vice- Chairman of X3J13 (the ANSI
committee responsible for the standardization of Common Lisp) and co-developer of the language itself, the new edition contains the entire text of the first edition plus six completely new chapters. They cover: - CLOS, the Common Lisp Object System, with new features to support function overloading and object-oriented programming, plus complete technical specifications * Loops, a powerful control structure for multiple variables * Conditions, a generalization of the error signaling mechanism * Series and generators * Plus other subjects not part of the ANSI standards but of interest to professional programmers. Throughout, you'll find fresh examples, additional clarifications, warnings, and tips - all presented with the author's customary vigor and wit.
Inhalt
Contents
Preface (Second Edition)
Acknowledgments (Second Edition)
Acknowledgments (First Edition)
1. Introduction
1.1. Purpose
1.2. Notational Conventions
1.2.1. Decimal Numbers
1.2.2. Nil, False, and the Empty List
1.2.3. Evaluation, Expansion, and Equivalence
1.2.4. Errors
1.2.5. Descriptions of Functions and Other Entities
1.2.6. The Lisp Reader
1.2.7. Overview of Syntax
2. Data Types
2.1. Numbers
2.1.1. Integers
2.1.2. Ratios
2.1.3. Floating-Point Numbers
2.1.4. Complex Numbers
2.2. Characters
2.2.1. Standard Characters
2.2.2. Line Divisions
2.2.3. Non-standard Characters
2.2.4. Character Attributes
2.2.5. String Characters
2.3. Symbols
2.4. Lists and Conses
2.5. Arrays
2.5.1. Vectors
2.5.2. Strings
2.5.3. Bit-Vectors
2.6. Hash Tables
2.7. Readtables
2.8. Packages
2.9. Pathnames
2.10. Streams
2.11. Random-States
2.12. Structures
2.13. Functions
2.14. Unreadable Data Objects
2.15. Overlap, Inclusion, and Disjointness of Types
3. Scope and Extent
4. Type Specifiers
4.1. Type Specifier Symbols
4.2. Type Specifier Lists
4.3. Predicating Type Specifiers
4.4. Type Specifiers That Combine
4.5. Type Specifiers That Specialize
4.6. Type Specifiers That Abbreviate
4.7. Defining New Type Specifiers
4.8. Type Conversion Function
4.9. Determining the Type of an Object
4.10. Type Upgrading
5. Program Structure
5.1. Forms
5.1.1. Self-Evaluating Forms
5.1.2. Variables
5.1.3. Special Forms
5.1.4. Macros
5.1.5. Function Calls
5.2. Functions
5.2.1. Named Functions
5.2.2. Lambda-Expressions
5.3. Top-Level Forms
5.3.1. Defining Named Functions
5.3.2. Declaring Global Variables and Named Constants
5.3.3. Control of Time of Evaluation
6. Predicates
6.1. Logical Values
6.2. Data Type Predicates
6.2.1. General Type Predicates
6.2.2. Specific Data Type Predicates
6.3. Equality Predicates
6.4. Logical Operators
7. Control Structure
7.1. Constants and Variables
7.1.1. Reference
7.1.2. Assignment
7.2. Generalized Variables
7.3. Function Invocation
7.4. Simple Sequencing
7.5. Establishing New Variable Bindings
7.6. Conditionals
7.7. Blocks and Exits
7.8. Iteration
7.8.1. Indefinite Iteration
7.8.2. General Iteration
7.8.3. Simple Iteration Constructs
7.8.4. Mapping
7.8.5. The "Program Feature"
7.9. Structure Traversal and Side Effects
7.10. Multiple Values
7.10.1. Constructs for Handling Multiple Values
7.10.2. Rules Governing the Passing of Multiple Values
7.11. Dynamic Non-Local Exits
8. Macros
8.1. Macro Definition
8.2. Macro Expansion
8.3. Destructuring
8.4. Compiler Macros
8.5. Environments
9. Declarations
9.1. Declaration Syntax
9.2. Declaration Specifiers
9.3. Type Declaration for Forms
10. Symbols
10.1. The Property List
10.2. The Print Name
10.3. Creating Symbols
11. Packages
11.1. Consistency Rules
11.2. Package Names
11.3. Translating Strings to Symbols
11.4. Exporting and Importing Symbols
11.5. Name Conflicts
11.6. Built-in Packages
11.7. Package System Functions and Variables
11.8. Modules
11.9. An Example
12. Numbers
12.1. Precision, Contagion, and Coercion
12.2. Predicates on Numbers
12.3. Comparisons on Numbers
12.4. Arithmetic Operations
12.5. Irrational and Transcendental Functions
12.5.1. Exponential and Logarithmic Functions
12.5.2. Trigonometric and Related Functions
12.5.3. Branch Cuts, Principal Values, and Boundary Conditions in the Complex Plane
12.6. Type Conversions and Component Extractions on Numbers
12.7. Logical Operations on Numbers
12.8. Byte Manipulation Functions
12.9. Random Numbers
12.10. Implementation Parameters
13. Characters
13.1. Character Attributes
13.2. Predicates on Characters
13.3. Character Construction and Selection
13.4. Character Conversions
13.5. Character Control-Bit Functions
14. Sequences
14.1. Simple Sequence Functions
14.2. Concatenating, Mapping, and Reducing Sequences
14.3. Modifying Sequences
14.4. Searching Sequences for Items
14.5. Sorting and Merging
15. Lists
15.1. Conses
15.2. Lists
15.3. Alteration of List Structure
15.4. Substitution of Expressions
15.5. Using Lists as Sets
15.6. Association Lists
16. Hash Tables
16.1. Hash Table Functions
16.2. Primitive Hash Function
17. Arrays
17.1. Array Creation
17.2. Array Access
17.3. Array Information
17.4. Functions on Arrays of Bits
17.5. Fill Pointers
17.6. Changing the Dimensions of an Array
18. Strings
18.1. String Access
18.2. String Comparison
18.3. String Construction and Manipulation
19. Structures
19.1. Introduction to Structures
19.2. How to Use Defstruct
19.3. Using the Automatically Defined Constructor Function
19.4. Defstruct Slot-Options
19.5. Defstruct Options
19.6. By-Position Constructor Functions
19.7. Structures of Explicitly Specified Representational Type
19.7.1. Unnamed Structures
19.7.2. Named Structures
19.7.3. Other Aspects of Explicitly Specified Structures
20. The Evaluator
20.1. Run-Time Evaluation of Forms
20.2. The Top-Level Loop
21. Streams
21.1. Standard Streams
21.2. Creating New Streams
21.3. Operations on Streams
22. Input/Output
22.1. Printed Representation of Lisp Objects
22.1.1. What the Read Function Accepts
22.1.2. Parsi…