Skip to content

Instantly share code, notes, and snippets.

@AppleCEO
Created January 14, 2020 14:27
Show Gist options
  • Save AppleCEO/a4b48c134f71a5a7226b9b5e98fb788a to your computer and use it in GitHub Desktop.
Save AppleCEO/a4b48c134f71a5a7226b9b5e98fb788a to your computer and use it in GitHub Desktop.
func solution(_ arr:[Int]) -> Double {
return Double(arr.reduce(0) { (result, number) -> Int in
result + number
})/Double(arr.count)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment