menegatti
01/24/2018, 3:24 PMcurrentTotal
is always equal to the final before
, right?
so
val list = some.things.map {
Something.fromOtherThing(it, currentTotal, currentTotal - it.amount).also {
currentTotal -= it.amount
}
}
val currentTotal = list.last().thirdParameter
should workziggy42
01/24/2018, 3:29 PM