Example usage of reduce function in Swift

Get sum from a list of decimal numbers (NSDecimalNumber):

public var cartTotal: NSDecimalNumber {
    cart.reduce(NSDecimalNumber(0)) { acc, v in
        acc.adding(v.price)
    }
}