Guest User

Untitled

a guest
Feb 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. (define (P x y)
  2. (cond ((= x 1) 1)
  3. ((= y x) 1)
  4. ((+ (P x (- y 1))
  5. (P (- x 1) (- y 1))))))
  6.  
  7.  
  8. (define (Row-sum-P y)
  9. (define (P-iter x y)
  10. (if (< x (+ y 1))
  11. (+ (P x y)
  12. (P-iter (+ 1 x) y))))
  13. (P-iter 1 y))
  14.  
  15. (Row-sum-P 5)
Add Comment
Please, Sign In to add comment