allocate

abstract fun allocate(money: Money, by: T): Result(source)

Allocates a Money.

If a Money amount is indivisible, its value is returned in the first element of the allocations list.

It's up to implementations to deal with rounding issues and to appropriately allocate any difference generated by the allocation operation.

Return

A Result with the allocation result.

Parameters

money

A Money amount to allocate according to by.

by

The parameter to calculate the allocations.