Safe Haskell | Safe-Infered |
---|
- data Allocation
- allocation :: Int -> Allocation
- unAllocation :: Allocation -> Int
- allocate :: Ord k => Map k Allocation -> Int -> Map k Int
Documentation
allocation :: Int -> AllocationSource
unAllocation :: Allocation -> IntSource
:: Ord k | |
=> Map k Allocation | Maps arbitrary unique values to the allocations, so that you can look up the corresponding allocations. |
-> Int | Allocated values will add up to this number. |
-> Map k Int | The given number, allocated into proportional parts. |
Divide up a whole number proportionally into several parts. The sum of the parts is guaranteed to add up to original number.