4 ms·
Congrats on the release. I'm excited to finish reading the book. I just thought you should know, however, that there's a minor mistake (I think) in some of the
by speek 16y ago
Congrats on the release. I'm excited to finish reading the book. I just thought you should know, however, that there's a minor mistake (I think) in some of the walkthrough stuff in the pdf. On page 56:
> (defun pudding-eater (person)
(cond ((eq person 'henry) (setf *arch-enemy* 'stupid-lisp-alien) '(curse you lisp alien – you ate my pudding))
((eq person 'johnny) (setf *arch-enemy* 'useless-old-johnny) '(i hope you choked on my pudding johnny))
(t '(why you eat my pudding stranger ?))))
> (pudding-eater 'johnny)
(I HOPE YOU CHOKED ON MY PUDDING JOHNNY)
> *arch-enemy*
JOHNNY
arch-enemy at this time should hold the value 'useless-old-johnny, not 'johnny
- deleted 16y ago[deleted]
- drcode 16y agoYes, you are right- You found the first errata! At least the intent of the code is still clear.
- kaffiene 16y agoBut LISP is immune to bugs!?! What gives??
- ponnap 16y agoIt seems to work for me. CL-USER> (defvar *arch-enemy* nil) (defun pudding-eater (person) (cond ((eq person 'henry)(setf *arch-enemy* 'stupid-lisp-alien)'(curse you lisp alien - you ate my pudding)) ((eq person 'johnny)(setf *arch-enemy* 'useless-old-johnny)'(i hope you choked on my pudding johnny)) (t'(why you ate my pudding stranger?)))) PUDDING-EATER CL-USER> *arch-enemy* NIL CL-USER> (pudding-eater 'johnny) (I HOPE YOU CHOKED ON MY PUDDING JOHNNY) CL-USER> *arch-enemy* USELESS-OLD-JOHNNY CL-USER>