Sunday, August 15, 2010

SICP 1.12

SICP 1.12

 (define (pascal row col)  
  (cond ((= col 0) 1)  
     ((= col row) 1)  
     (else (+ (pascal (- row 1) (- col 1)) (pascal (- row 1) col)))))  

No comments:

Post a Comment