RosettaCodeData/Task/Partition-function-P/Haskell/partition-function-p-2.hs

3 lines
90 B
Haskell
Raw Permalink Normal View History

2025-02-27 18:35:13 -05:00
part = 1 : b 1
where b n = p where p = zipWith (+) (1 : b (n + 1)) (replicate n 0 ++ p)