内容 1.3 Formulating Abstractions with Higher-Order Procedures · 55
练习 自检推理
Exercise 1.34: Suppose we define the procedure
(define (f g) (g 2))
Then we have
(f square)
4
(f (lambda (z) (* z (+ z 1))))
6
What happens if we (perversely) ask the interpreter to evaluate the combination
(f f)? Explain.
练习 1.34:假设我们定义过程
(define (f g) (g 2))
那么有
(f square)
4
(f (lambda (z) (* z (+ z 1))))
6
如果我们(出于恶趣味)让解释器对组合式 (f f) 求值,会发生什么?请解释。
SICP source code scheme
(define (f g) (g 2)) SICP source code scheme
(f square)
4
(f (lambda (z) (* z (+ z 1))))
6 我的笔记 自动保存