You are given an interpreter for a Scheme-like language written in Scheme. Here is a sample interaction with the interpreter:
/cs/classes/cis624/www/code/exceptions > which scheme /local/apps/chez-6.0/bin/scheme /cs/classes/cis624/www/code/exceptions > scheme Chez Scheme Version 6.0 Copyright (c) 1998 Cadence Research Systems > (load "interp.ss") > (rep) --> (define fact (lambda (n) (if (equal n 0) 1 (* n (fact (sub1 n)))))) --> (fact 5) 120 --> (define x 9) --> (begin (set! x 5) (fact x)) 120 --> (car (cdr (cons 1 (cons 2 (cons 3 (cons 4 emptylist)))))) 2 --> quit > (exit) /cs/classes/cis624/www/code/exceptions >The interpreter has the annoying property that any error during the read-eval-print loop aborts the entire process. To remedy this, your assignment is to do the following:
sabry@cs.uoregon.edu