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

6 lines
112 B
Haskell
Raw Permalink Normal View History

2015-02-20 00:35:01 -05:00
coeffs = iterate next [1]
where
next ns = zipWith (+) (0:ns) $ ns ++ [0]
main = print $ coeffs !! 5 !! 3