Straightforward translation of the formula:
func binomial(n,k) { n! / ((n-k)! * k!) } say binomial(400, 200)
Alternatively, by using the Number.binomial() function:
Number.binomial()
say binomial(400,200)
Last updated 2 years ago