Jump to content

Evaluate binomial coefficients: Difference between revisions

Line 1,095:
{{out}}
<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}}==
1,935

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.