Question: Problem 3 Implement a symbol table data type that supports the following operations: 1. NewTableO : returns an empty table value; 2. InsertIntoTable((variable value), table)

Problem 3 Implement a symbol table data type that supports the following operations: 1. NewTableO : returns an empty table value; 2. InsertIntoTable((variable value), table) : inserts a variable/value pair into the table 3. LookupTable(variable, table) finds entry for variable and returns its value. If no variable is found, the empty list is returned. If more than one entry for a variable, the most recently entered value for that variable will be returned. (defineNewTable (lambda () )) (define InsertIntoTable (lambda (entry table) // entry is a list of a variable and a value (define LookupTable (lambda (variable table) (define table (InsertIntoTable(b (2 4 5)) (InsertIntoTable (a 7) (NewTable)))) (LookupTable 'a table) --> 7 (LookupTable 'b table) --> '(2 4 5) (LookupTable 'c table) -->
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
