Evaluate binomial coefficients: Difference between revisions
Content added Content deleted
(→Functional Python: Added tests for k=0 to k=5 (where n = 5)) |
|||
Line 1,918: | Line 1,918: | ||
# factorial :: Int -> Int |
# factorial :: Int -> Int |
||
def factorial(x): |
def factorial(x): |
||
return product( |
return product(enumFromTo(1)(x)) |
||