SICP Exercise 3.25 make-table generalized
Exercise 3.25. Generalizing one- and two-dimensional tables, show how to implement a table in which values are stored under an arbitrary number of keys and different values may be stored under different numbers of keys. The lookup and insert! procedures should take as input a list of keys used to access the table. SOLUTION The code is here . The table structure can be seen here . Supported table structure is something like: TABLE -------- K1: val1 K2: val2 K3: val3 K31: val31 K32: (no value) K321: val321 K322: val322 K33: val33 K4: val4 So the key combinations to retrieve data would be: K1 retrieves val1 K2 retrieves val2 K3 retrieves val3 K3, K31 retrieves val31 K3, K32, K321 retrieves val321 K3, K32, K322 retrieves val322 K3, K33 retrieves val33 K4 retrieves val4 Note: I want to allow for the possibility for not just primitives like string literals and numbers but obj...