exercise-1.scm (471B)
1 (define-library (sicp tests chapter-3 exercise-1) 2 (import (scheme base) 3 (srfi :64) 4 (sicp solutions chapter-3 exercise-1)) 5 6 (begin 7 (define A (make-accumulator 5)) 8 (define B (make-accumulator 0)) 9 10 (test-begin "chapter-3-exercise-1") 11 (test-equal 12 15 13 (A 10)) 14 (test-equal 15 10 16 (B 10)) 17 (test-equal 18 25 19 (A 10)) 20 (test-equal 21 20 22 (B 10)) 23 (test-end "chapter-3-exercise-1")))