]> git.rkrishnan.org Git - sicp.git/blob - src/sicp/ex2_44.clj
Solution to 4.44. A bit too verbose. Can be improved by better
[sicp.git] / src / sicp / ex2_44.clj
1 (ns sicp.ex2_44
2   (:use [sicp.ch2-2 :only (beside below)]))
3
4 (defn up-split [painter n]
5   (if (= n 0)
6     painter
7     (let [smaller (up-split painter (- n 1))]
8       (below painter (beside smaller smaller)))))