练习2.45
我们先将right-split和up-split抽象出一个split来。
(define (split big-combinersmall-combiner)
(lambda (painter n)
(if (= n 0)
painter
(let ((smaller ((split big-combinersmall-combiner) painter (- n 1))))
(big-combiner painter (small-combinersmaller smaller))))))
重新将up-split两个函数写入Edwin并编译一下即可实现重定义。
时间: 2024-09-29 06:34:58