5 lines
145 B
Scheme
5 lines
145 B
Scheme
#lang sicp
|
|
|
|
(define (solution n k)
|
|
(cond ((or (= n 1) (= k 1) (= k n)) 1)
|
|
(else (+ (solution (- n 1) (- k 1)) (solution (- n 1) k)))))
|