Advertisement
Guest User

Untitled

a guest
Jul 31st, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. func mean(arr: [Double]) -> Double {
  2. let length = Double(arr.count)
  3. return arr.reduce(0, {$0 + $1}) / length
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement