Chapter 3, Modularity, Objects, and State
Exercise 3.1
1
2
3
4
5
6
7
8
#lang sicp
(define (make-accumulator total)
(lambda (amt)
(set! total (+ total amt))
total
)
)
1
2
3
4
5
6
7
8
#lang sicp
(define (make-accumulator total)
(lambda (amt)
(set! total (+ total amt))
total
)
)