mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 06:18:05 +02:00
5 lines
No EOL
168 B
Haskell
5 lines
No EOL
168 B
Haskell
binom :: (Eq a, Num a, Num a1) => a -> a -> a1
|
|
binom n k
|
|
| (k==0) || (k==n) = 1
|
|
| otherwise = binom (n-1) (k-1)
|
|
+ binom (n-1) k |