Common LISP: A Gentle Introduction to Symbolic Computation 9780486791708, 048679170X, 9781306512855, 1306512859

This highly accessible introduction to Lisp is suitable both for novices approaching their first programming language an

602 104 13MB

English Year 2014

Report DMCA / Copyright

DOWNLOAD FILE

Common LISP: A Gentle Introduction to Symbolic Computation
 9780486791708, 048679170X, 9781306512855, 1306512859

Table of contents :
Content: Cover
Title Page
Copyright Page
Dedication
Preface
Note to Instructors
Acknowledgements
Contents
1. Functions and Data
1.1. Introduction
1.2. Functions On Numbers
1.3. Three Kinds of Numbers
1.4. Order Of Inputs Is Important
1.5. Symbols
1.6. The Special Symbols T and NIL
1.7. Some Simple Predicates
1.8. The EQUAL Predicate
1.9. Putting Functions Together
1.9.1. Defining ADD1
1.9.2. Defining ADD2
1.9.3. Defining TWOP
1.9.4. Defining ONEMOREP
1.10. The NOT Predicate
1.11. Negating A Predicate
1.12. Number of Inputs to a Function
1.13. Errors
Advanced Topics. 1.14. The History of Lisp2. Lists
2.1. Lists Are The Most Versatile Data Type
2.2. What Do Lists Look Like?
2.3. Lists of One Element
2.4. Nested Lists
2.5. Length of Lists
2.6. NIL: The Empty List
2.7. Equality of Lists
2.8. FIRST, SECOND, THIRD, and REST
2.9. Functions Operate On Pointers
2.10. AR and CDR
2.10.1. The CDR of a Single-Element List
2.10.2. Combinations of CAR and CDR
2.10.3. CAR and CDR of Nested Lists
2.10.4. CAR and CDR of NIL
2.11. CONS
2.11.1. CONS and the Empty List
2.11.2. Building Nested Lists With CONS
2.11.3. CONS Can Build Lists From Scratch. 2.12. Symmetry of CONS and CAR/CDR2.13. LIST
2.14. Replacing the First Element of a List
2.15. List Predicates
Advanced Topics
2.16. Unary Arithmetic with Lists
2.17. Nonlist Cons Structures
2.18. Circular Lists
2.19. Length of Nonlist Cons Structures
3. EVAL Notation
3.1. Introduction
3.2. The EVAL Function
3.3. EVAL Notation Can Do Anything Box Notation Can Do
3.4. Evaluation Rules Define the Behavior of EVAL
3.5. Defining Functions in EVAL Notation
3.6. Variables
3.7. Evaluating Symbols
3.8. Using Symbols and Lists as Data
3.9. The Problem of Misquoting. 3.10. Three Ways to Make Lists3.11. Four Ways to Misdefine a Function
3.12. More About Variables
Lisp on the Computer
3.13. Running Lisp
3.14. The Read-Eval-Print Loop
3.15. Recovering From Errors
Lisp Toolkit: ED
Keyboard Exercise
Advanced Topics
3.16. Functions of No Arguments
3.17. The QUOTE Special Function
3.18. Internal Structure of Symbols
3.19. Lambda Notation
3.20. Scope of Variables
3.21. EVAL and APPLY
4. Conditionals
4.1. Introduction
4.2. The IF Special Function
4.3. The COND Macro
4.4. Using T as a Test
4.5. Two More Examples of COND. 4.6. COND and Parenthesis Errors4.7. The AND and OR Macros
4.8. Evaluating AND and OR
4.9. Building Complex Predicates
4.10. Why AND and OR are Conditionals
4.11. Conditionals are Interchangeable
Lisp Toolkit: STEP
Advanced Topics
4.12. Boolean Functions
4.13. Truth Tables
4.14. DeMorgan's Theorem
5. Variables and Side Effects
5.1. Introduction
5.2. Local and Global Variables
5.3. SETF Assigns a Value to a Variable
5.4. Side Effects
5.5. The LET Special Function
5.6. The LET* Special Function
5.7. Side Effects Can Cause Bugs
Lisp Toolkit: DOCUMENTATION and APROPOS.

Polecaj historie