Calling the Evaluator Explicitly (Cont.)
> (define exp '(+ 3 4 (* 5 6) 7 8))
(+ 3 4 (* 5 6) 7 8)
> (eval exp)
52
> (eval (cons '* (cdr exp)))
20160
; = (* 3 4 (* 5 6) 7 8)
Previous slide
Next slide
Back to first slide
View graphic version