Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 149 Bytes
(define (make-accumulator acc)
(lambda (x)
(set! acc (+ acc x))
acc))
(define A (make-accumulator 5))
(A 10)
;Value: 15
(A 10)
;Value: 25