Skip to content

Instantly share code, notes, and snippets.

@BaseCase
Created September 4, 2008 21:00
Show Gist options
  • Save BaseCase/8878 to your computer and use it in GitHub Desktop.
Save BaseCase/8878 to your computer and use it in GitHub Desktop.
;Exercise 1.12 - Write a procedure that computes elements of
; Pascal's Triangle via a recursive process.
(define (pascal row col)
(if (or (= row col) (= col 1))
1
(+ (pascal (- row 1) (- col 1)) (pascal (- row 1) col))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment