package gw.currency uses gw.pl.currency.MonetaryAmount @ReadOnly enhancement GWArrayOfMonetaryAmountCoreEnhancement : MonetaryAmount[] { /** * Sums up the MonetaryAmount contents, * which must all be of the specified currency. */ function sum(currency : Currency) : MonetaryAmount { return this.sum(currency, \ amt -> amt) } /** * Return the average of the MonetaryAmount contents, * which must all be of the specified currency. */ function average(currency : Currency) : MonetaryAmount { return this.toList().average(currency, \ amt -> amt) } }