distribute

open tailrec override fun distribute(units: List<Money>, allocations: List<Money>): List<Money>(source)

Distributes the difference units in the allocations list.

Return

The allocation result.

Parameters

units

The difference units to be allocated.

allocations

The allocations list.