title: find sum of all elements in array in swift 4
body: <p>I have array like this </p>
  
  <pre><code>let arr = [1,2,3,4,5,6,7,8,9,10]
  </code></pre>
  
  <p>I tried   <code>var totalSum = arr.map({$0.points}).reduce(0, +)</code>
  but not worked </p>
  
  <p>can I find all objects sum value?</p>