exercise-1.scm (633B)
1 (define-library (sicp tests chapter-4 exercise-1) 2 (import (scheme base) 3 4 (srfi :64) 5 6 (sicp solutions chapter-4 exercise-1)) 7 8 (begin 9 (test-begin "chapter-4-exercise-1") 10 11 (test-equal -1 12 (left-to-right:eval '(+ -2 1) 13 (left-to-right:make-environment '(+) 14 `((primitive ,+))))) 15 16 (test-equal -1 17 (right-to-left:eval '(+ -2 1) 18 (right-to-left:make-environment '(+) 19 `((primitive ,+))))) 20 21 (test-end "chapter-4-exercise-1")))