内容 3.3 Modeling with Mutable Data · 222
练习 自检推理
Exercise 3.20: Draw environment diagrams to
illustrate the evaluation of the sequence of expressions
(define x (cons 1 2))
(define z (cons x x))
(set-car! (cdr z) 17)
(car x)
17
using the procedural implementation of pairs given above. (Compare
Exercise 3.11.)
练习 3.20:请画出环境图,说明如下表达式序列的求值过程:
(define x (cons 1 2))
(define z (cons x x))
(set-car! (cdr z) 17)
(car x)
17
请使用上面给出的序对的过程式实现。(对比练习 3.11。)
SICP source code scheme
(define x (cons 1 2))
(define z (cons x x))
(set-car! (cdr z) 17)
(car x)
17 我的笔记 自动保存