I\'m just starting out and I\'m looking for an easy way to sum a simple array. I\'ve read into apple developer site on key value coding and I don\'t understand how to apply
Swift 3: (Dave DeLong's method transformed):
let sum = (numArray as AnyObject).value(forKeyPath:"@sum.self") as! Double
This should work in a similar fashion to it's Objective-C counterpart.