Help for this page

Select Code to Download


  1. or download this
    partition :: Integer -> Integer -> [[Integer]]
    partition total 1 = [[total]]
    ...
    
    -- then:
    partition 100 5
    
  2. 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
    
  3. or download this
    allLists :: Integer -> Integer -> [[Integer]]
    allLists n len = ?