Scheme Microcode Version 11.146 MIT Scheme running under SunOS Type `^C' (control-C) followed by `H' to obtain information about interrupts. Scheme saved on Sunday November 21, 1993 at 9:15:23 PM Release 7.3.1 Microcode 11.146 Runtime 14.166 1 ]=> ; First, load your system (load "p1") ;Loading "p1.scm" -- done ;Value: display-bindings 1 ]=> ; Use comments to describe what the next few test cases are. ; This mini and vastly incomplete test suite is from the assignment handout. ; First define some useful bindings, if necessary (define bindings `((a . 1) (b . 2) (f . ,(lambda (x) (* x x))))) ;Value: bindings 1 ]=> bindings ;Value 1: ((a . 1) (b . 2) (f . #[compound-procedure 2])) 1 ]=> ; Then run the system (run bindings) >((f a) + b) 3 >(a := 5) a >((g c) + 3) Undefined symbol: g Undefined symbol: c >((g x) := (x + 1)) (g x) >((g c) + 3) Undefined symbol: c >(g a) 6 >(:= a 3) Invalid or unsupported expression. >(a :=) Invalid or unsupported expression. >(a := 5 2) Invalid or unsupported expression. >quit Done! ;No value 1 ]=> ; To start a different run, e.g., if you want to start again with different ; bindings, just redefine bindings and restart the system. (define bindings ()) ;Value: bindings 1 ]=> (run bindings) >; You can also place comments in the middle of your run, using `;' ; use an undefined variable a Undefined symbol: a >; define a variable by assigning it a value (a := 5) a >; use a defined variable a 5 >quit Done! ;No value 1 ]=> ; Or you can just call run with bindings you provide directly--do whatever ; most clearly shows how you are testing your system. (run '((a . 1))) >a 1 >quit Done! ;No value 1 ]=> End of input stream reached Happy Happy Joy Joy.