choose(n,k) := binomial(n, k, 1, 1);
binomial(n, k, i, result) :=
result when i > k else
binomial(n, k, i + 1, (result * (n - i + 1)) / i);