using the substitution model
example
(define (square i) (* i i))
(define (sum-of-squares i j) (+ (square i) (square j)))
(sum-of-squares 3 4)
(+ (square 3) (square 4))
(+ (* 3 3) (* 4 4))
(+ (* 3 3) 16)
(+ 9 16)
25
Previous slide
Next slide
Back to first slide
View graphic version