PIC Common Lisp The Language

Second Edition

Guy L. Steele Jr.
Thinking Machines Corporation
with contributions by
Scott E. Fahlman
Carnegie-Mellon University
Richard P. Gabriel
Lucid, Inc.
Stanford University
David A. Moon
Symbolics, Incorporated
Daniel L. Weinreb
Symbolics, Incorporated
and with contributions to the second edition by
Kent M. Pitman
Symbolics, Incorporated
Richard C. Waters
Massachusetts Institute of Technology
Jon L White
Lucid, Inc.

© 1984, 1989 Guy L. Steele Jr. All rights reserved.

To be published by Digital Press.

Would it be wonderful if, under the pressure of all these difficulties, the Convention should have been forced into some deviations from that artificial structure and regular symmetry which an abstract view of the subject might lead an ingenious theorist to bestow on a constitution planned in his closet or in his imagination?

James Madison, The Federalist
No. 37, January 11, 1788

Contents
Preface SECOND EDITION
Acknowledgments SECOND EDITION
Acknowledgments FIRST EDITION (1984)
1 Introduction
 1.1 Purpose
 1.2 Notational Conventions
2 Data Types
 2.1 Numbers
 2.2 Characters
 2.3 Symbols
 2.4 Lists and Conses
 2.5 Arrays
 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.2 Functions
 5.3 Top-Level Forms
6 Predicates
 6.1 Logical Values
 6.2 Data Type Predicates
 6.3 Equality Predicates
 6.4 Logical operators
7 Control Structure
 7.1 Constants and Variables
 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.9 Structure Traversal and Side Effects
 7.10 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
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.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
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
20 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.2 Input Functions
 22.3 Output Functions
 22.4 Querying the User
23 File System Interface
 23.1 File Names
 23.2 Opening and Closing Files
 23.3 Renaming, Deleting, and Other File Operations
 23.4 Loading Files
 23.5 Accessing Directories
24 Miscellaneous Features
 24.1 The Compiler
 24.2 Debugging Tools
 24.3 Environment Inquiries
 24.4 Identity Function
25 Loop
26 Цикл loop
 26.1 Introduction
 26.2 Введение
 26.3 How the Loop Facility Works
 26.4 Как работает Loop
 26.5 Parsing Loop Clauses
 26.6 Парсинг выражений Loop
 26.7 User Extensibility
 26.8 Пользовательские расширения
 26.9 Loop Constructs
 26.10 Конструкции Loop
 26.11 Iteration Control
 26.12 Управление итерациями
 26.13 End-Test Control
 26.14 Проверка завершения
 26.15 Value Accumulation
 26.16 Variable Initializations
 26.17 Инициализация переменных
 26.18 Conditional Execution
 26.19 Условное выполнение
 26.20 Unconditional Execution
 26.21 Безусловное выполнение
 26.22 Miscellaneous Features
 26.23 Дополнительные возможности
27 Pretty Printing
 27.1 Introduction
 27.2 Pretty Printing Control Variables
 27.3 Dynamic Control of the Arrangement of Output
 27.4 Format Directive Interface
 27.5 Compiling Format Control Strings
 27.6 Pretty Printing Dispatch Tables
28 Common Lisp Object System
 28.1 Programmer Interface Concepts
 28.2 Functions in the Programmer Interface
29 Conditions
 29.1 Introduction
 29.2 Changes in Terminology
 29.3 Survey of Concepts
 29.4 Program Interface to the Condition System
 29.5 Predefined Condition Types
30 Metaobject Protocol
 30.1 Concepts
 30.2 Generic Functions and Methods Dictionary
Bibliography
X3J13 Votes
Symbols
Colophon

[Next]