Exercise 1.12: (back)
Scheme:
(define (pascal-triangle row col) (cond ((= col 0) 1) ((= row 1) 1) ((= col 1) 1) ((= row col) 1) (else (+ (pascal-triangle (- row 1) (- col 1)) (pascal-triangle (- row 1) col)))))
Exercise 1.12: (back)
Scheme:
(define (pascal-triangle row col) (cond ((= col 0) 1) ((= row 1) 1) ((= col 1) 1) ((= row col) 1) (else (+ (pascal-triangle (- row 1) (- col 1)) (pascal-triangle (- row 1) col)))))