To be noted: the drawing in exercise 1.14 is unfinished. I did it in a notebook, but haven't yet had the time to put it in a txt file.
8 lines
154 B
Scheme
8 lines
154 B
Scheme
#lang sicp
|
|
|
|
(define (A x y)
|
|
(cond ((= y 0) 0)
|
|
((= x 0) (* 2 y))
|
|
((= y 1) 2)
|
|
(else (A (- x 1)
|
|
(A x (- y 1))))))
|