huangzworks / SICP-answers

我的 SICP 解题集
http://sicp.readthedocs.org/
882 stars 183 forks source link

3.3.3表格的表示 代码有错 #57

Open Perry961002 opened 5 years ago

Perry961002 commented 5 years ago

(define (insert! key-1 key-2 value) (let ((subtable (assoc key-1 (cdr local-table)))) (if subtable (let ((record (assoc key-2 (cdr subtable)))) (if record (set-cdr! record value) (set-cdr! subtable (cons (key-2 value) (cdr subtable))))) (set-cdr! local-table (cons (list key-1 (cons key-2 value)) (cdr local-table))))) 'ok)

第8行有错