| Safe Haskell | Safe-Infered |
|---|
Penny.Cabin.Allocate
- data Allocation
- allocation :: Int -> Allocation
- unAllocation :: Allocation -> Int
- allocate :: Ord k => Map k Allocation -> Int -> Map k Int
Documentation
data Allocation Source
Instances
allocation :: Int -> AllocationSource
unAllocation :: Allocation -> IntSource
Arguments
| :: 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.