练习 2.44

up-split 的定义和 right-split 的定义非常相似,唯一的区别是 besidebelow 的位置不同:

;;; 44-up-split.scm

(define (up-split painter n)
    (if (= n 0)
        painter
        (let ((smaller (up-split painter (- n 1))))
            (below painter
                   (beside smaller smaller)))))

讨论

blog comments powered by Disqus