This question is related to the code in Chapter 6 of Conrad Barsky, Land of Lisp .
The code is as follows
(defun tweak-text (lst caps lit) (when lst (let ((item (car lst)) (rest (cdr lst))) (cond ((eq item
Now look at the part (lit ..) and the material below it. ((or caps nil) ..) , so my question is as follows
- If
lit always true, it will be evaluated in the previous expression specified - If this is not the case, the last expression will always be evaluated as
(or caps false) => (or caps false) , which is practically useless?
Therefore, the last expression should not be (caps (cons (char ...)) ?
This book has been read by thousands, so I must be wrong about something, and I'm not John Bell.
lisp common-lisp
functor-soup
source share