Skip to content

Instantly share code, notes, and snippets.

@yao2030
Created December 9, 2012 03:00
Show Gist options
  • Save yao2030/4243149 to your computer and use it in GitHub Desktop.
Save yao2030/4243149 to your computer and use it in GitHub Desktop.
(define (pascal row col)
(cond ((= col 0) 1)
((= col row) 1)
((< row col) 0)
(else (+ (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