Develop an interaction system around interpret-with-defs

In sections 14.4 and 17.7 we developed an evaluator for a portion of Scheme. A typical Scheme implementation also provides an INTERACTIVE user interface. In DrScheme, the Interactions window plays this role. An interactive system prompts the reader for definitions and expressions, evaluates them appropriately, and possibly produces some result. Definitions are added to some repository; to confirm the addition, the interactive system may produce a value like true. Expressions are evaluated relative to the definition repository. The function interpret-with-defs from section 17.7 performs this role. Develop an interaction system around interpret-with-defs. The system should provide at least two services:

1. add-definition, which adds (the representation of) some function definition to the system's repository;

2. evaluate, which consumes (the representation of) some expression and evaluates it relative to the current repository.
If a user adds two (or more) definitions for some function f, the last addition is the one that matters. The previous ones can be ignored.

                                                                                                                                  Order Now

Place Order