I'm writing a *period function to let me scale periods, for example doubling (period [months 1] [hours 3])to (period [months 2] [hours 6]). I was hoping to do this by calling period->list, scaling the amount part of each unit-amount pair, and then converting the new list of units and amounts back to a period with list->period. To my dismay, that procedure doesn't exist. It would have been a nice to have in this instance.
I'm writing a
*period
function to let me scale periods, for example doubling(period [months 1] [hours 3])
to(period [months 2] [hours 6])
. I was hoping to do this by callingperiod->list
, scaling the amount part of each unit-amount pair, and then converting the new list of units and amounts back to a period withlist->period
. To my dismay, that procedure doesn't exist. It would have been a nice to have in this instance.