The Department of Computer Science & Engineering
cse@buffalo

CSE202: Programming in Lisp

Course
Grades
Email

Welcome

Policies
    Grades
    Inc
    Intgrty

Preface
Part I
  Chap 1
  Chap 2
  Chap 3
  XEmacs
  Chap 4
  Chap 5
  Chap 6
  Chap 7
  Chap 8
  Chap 9
Part II
  Chap 10
  Chap 11
  Chap 12
  Chap 13
  Chap 14
  Chap 15
  Chap 16
  Chap 17
  Chap 18
  Chap 19
  Chap 20
  Chap 21
  Chap 22
  Chap 23
Part III
  Chap 24
  Chap 25
  Chap 26
  Chap 27
  Chap 28
  Chap 29
  Chap 30
  Chap 31
  Chap 32
CHAPTER 11: DEFINING FUNCTIONS IN PACKAGES
Corrections
  1. page 73, lines 1 - 2: Change
    
    > (in-package 'learn)
    #<Package LEARN 52200250>
    
    to
    
    > (defpackage learn)
    #<The LEARN package>
    
    > :pa learn
    >
    

  2. page 73, lines -6 - -5: Change
    
    > (in-package 'user)
    #<Package USER 2150061>
    
    to
    
    > :pa user
    >
    

  3. page 74, lines 8 - 9: Change
    
    > (in-package 'learn)
    LEARN
    
    to
    
    > :pa learn
    >
    

  4. page 74, lines -6 - -5: Change
    
    > (in-package 'user)
    #<Package USER 2150061>
    
    to
    
    > :pa user
    >
    

  5. page 75, lines 11 - 12: Change
    
    > (in-package 'learn)
    #<Package LEARN 4434433>
    
    to
    
    > :pa learn
    >
    

  6. page 75, lines -10 - -9: Change
    
    > (in-package 'user)
    #<Package USER 2150061>
    
    to
    
    > :pa user
    >
    
Notes
  1. Read Chapter 11.

  2. Do Exercise 11.1, carefully doing everything in exactly the same order as in the book, and using the above corrections.

  3. Create the file ch11.cl, and paste the following into it:
    ----------------------- cut here -----------------------
    ;;; Answers to Chapter 11 Exercises
    ;;;
    ;;; 11.2 My definition of reverse is:
    ???
    ;;; The following interaction shows first learn::reverse being tested,
    ;;; and then lisp:reverse being tested:
    ???
    ;;;
    ;;; 11.3 My definition of discrim is:
    ???
    ----------------------- cut here -----------------------
    
    Replace the question marks with the appropriate material, and submit the file.

  4. Do Exercise 11.4, and then compare your definition with the one in Appendix A.

  5. Chapter 12 is the chapter most affected by the change to ANSI Common Lisp, and the one most subject to local variations. Be sure to read the Notes for Chapter 12 along with the chapter in the text.

Next

Copyright © 1999, 2000 by Stuart C. Shapiro. All rights reserved.

Stuart C. Shapiro <shapiro@cse.buffalo.edu>