adição de números da matriz swift

var totalSum = scaleData.map({$0.points}).reduce(0, +)
Sarthak Salunke