paip-lisp icon indicating copy to clipboard operation
paip-lisp copied to clipboard

Errata for chapter 8

Open gregr opened this issue 5 years ago • 0 comments

I noticed a couple of mistakes in the definition of integrate (page 256) that probably slipped by testing. In the sketch below, I've indicated the mistakes with comments describing corrections:

(cond
  ((free-of exp x) `(* ,exp x))   ;; This should instead unquote x as in `(* ,exp ,x).
  ...
  ((starts-with exp '-)
   (ecase ...
     (1 (integrate (exp-lhs exp) x))  ;; This should instead build a unary minus operation to account for negation, as in `(- ,(integrate (exp-lhs exp) x)).
     ...

gregr avatar Jun 13 '19 17:06 gregr