sum(ofProperty:)
public func sum<T: AddableType>(ofProperty property: String) -> T
Returns the sum of the values of a given property over all the objects in the list.
Warning
Only a property whose type conforms to the AddableType protocol can be specified.
-
Declaration
Swift
public func sum<T: AddableType>(ofProperty property: String) -> T
View on GitHub
Install in Dash
sum(ofProperty:) Instance Method Reference