A pattern hard to recognize?



To protect against dividing by zero, put a conditional
into the lambda form:

(%i1) binomial_id : 'binomial = lambda([n,k], if k = 0 then 1 else (n-k +
 1) *
 binomial(n,k-1)/k)$

If you always use the variable names n and k, ratsubst
works OK; otherwise, substituting a lambda form for the
function name might be the way to go.

Barton