(define (compose f g)
(lambda (x) (f (g x))))
(define square
(lambda (x) (* x x)))
(define inc
(lambda (x) (+ x 1)))
((compose square inc) 6)
SICP 习题1. 42 compose
最新推荐文章于 2019-04-25 18:13:00 发布
本文介绍了使用Scheme语言定义函数的方法,包括函数的组合使用。通过具体示例解释了如何定义和使用compose、square及inc等函数,并展示了这些函数如何被组合起来应用于数值计算。
629

被折叠的 条评论
为什么被折叠?



