Permalink
Browse files

added solution for 1.12

  • Loading branch information...
1 parent 6e5eeb1 commit 0824948d43feb9046d19ff32e6bb48fae5c50d3b @cosmin committed Jan 31, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 exercise-1-12.ss
View
@@ -0,0 +1,8 @@
+(define (pascal row column)
+ (cond ((or (= column 1) (= column row)) 1)
+ (else (+ (pascal (- row 1) (- column 1))
+ (pascal (- row 1) column)))))
+
+(= (pascal 1 1) 1)
+(= (pascal 2 2) 1)
+(= (pascal 4 2) 3)

0 comments on commit 0824948

Please sign in to comment.