Czar
04/21/2017, 2:45 PMclass Entry(val amount)
val entries = /*list of Entry objects*/
val bigDecimalSum: BigDecimal = entries
.map { it::getAmount }
.fold(BigDecimal.ZERO, BigDecimal::plus) does not compile:
>> None of the following functions can be called with the arguments supplied:public open fun plus(): BigDecimal! defined in java.math.BigDecimal public open operator fun plus(mc: MathContext!): BigDecimal! defined in java.math.BigDecimal