- or download this
partition :: Integer -> Integer -> [[Integer]]
partition total 1 = [[total]]
...
-- then:
partition 100 5
- or download this
partition :: Integer -> Integer -> [[Integer]]
partition total 1 = [[total]]
...
subpart x = partition (total - x) (numparts - 1)
numlist = filter twoorfive [total, (total - 1) .. 0]
twoorfive x = x `mod` 2 == 0 || x `mod` 5 == 0
- or download this
allLists :: Integer -> Integer -> [[Integer]]
allLists n len = ?