SICP Exercise 2.45 split

Exercise 2.45.  Right-split and up-split can be expressed as instances of a general splitting operation. Define a procedure split with the property that evaluating

(define right-split (split beside below))
(define up-split (split below beside))


produces procedures right-split and up-split with the same behaviors as the ones already defined.

SOLUTION


The code and tests are here.

; Test Results in the image(s) below



Comments

Popular posts from this blog

SICP Exercise 4.9 do for while until

SICP Exercise 3.56 merge streams

SICP Exercise 4.14 map as compound vs. primitive type