<< Previous exercise (2.51) | Index | Next exercise (2.53) >>
;; a (define wave (segments->painter (list ;; ... (make-segment (make-vect 0.44 0.7) (make-vect 0.51 0.7))))) ;; b (define (corner-split painter n) (if (= n 0) painter (beside (below painter (up-split painter (- n 1))) (below (right-split painter (- n 1)) (corner-split painter (- n 1)))))) ;; c (define (square-limit painter n) (let ((combine4 (square-of-four flip-vert rotate180 identity flip-horiz))) (combine4 (corner-split painter n))))
should it be n instead of (- n 1) for up-split and right-split? Since (right-split painter 0) will return painter, which makes it results different from the original corner-split.
LisScheSic
I think the exercise "for example, by using only one copy of the up-split and right-split images instead of two" doesn't imply changing n. And up-split just splits vertically, so it is weird to make it bigger at the top-left location.