Evaluate binomial coefficients: Difference between revisions

Content added Content deleted
Line 1,095: Line 1,095:
{{out}}
{{out}}
<pre>10</pre>
<pre>10</pre>

One drawback of this method is that it returns a Rat, not an Int. If we really worry about it, we can enforce the conversion:
<lang perl6>sub infix:<choose> { ([*] ($^n ... 0) Z/ 1 .. $^p).Int }</lang>


=={{header|PL/I}}==
=={{header|PL/I}}==