RosettaCodeData/Task/Evaluate-binomial-coefficients/Haskell/evaluate-binomial-coefficients-4.hs

6 lines
112 B
Haskell
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
coeffs = iterate next [1]
where
next ns = zipWith (+) (0:ns) $ ns ++ [0]
main = print $ coeffs !! 5 !! 3