RosettaCodeData/Task/Evaluate-binomial-coefficients/Oz/evaluate-binomial-coefficients.oz
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

10 lines
173 B
Text

declare
fun {BinomialCoeff N K}
{List.foldL {List.number 1 K 1}
fun {$ Z I}
Z * (N-I+1) div I
end
1}
end
in
{Show {BinomialCoeff 5 3}}