I am defining a function binomial(n k) (aka Pascal\'s triangle) but am getting an error:
binomial(n k)
application: not a procedure; expected a procedure
This is the correct code:
(define (binomial n k) (cond ((or (= n 0) (= n k)) 1) (else (+ (binomial n (- k 1))(binomial(- n 1) (- k 1))))))
Problem is at here:
(binomial (n) (- k 1))