fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 67: Binomial coefficient n choose k
Idiom # 67: Binomial coefficient n choose k
See
programming-idioms.org
:
Code
binom(n, k int) => factorial n / (factorial k * factorial n-k) factorial(x int) => (int 1 .. x) .reduce (int 1) (r,t -> r * t)
What are effects?
last changed: 2024-07-01
next: Idiom # 68: Create a bitset