Skip to content

Instantly share code, notes, and snippets.

@EJSohn
Created April 22, 2019 12:24
Show Gist options
  • Select an option

  • Save EJSohn/da2b8fd31bfe4117d19913966adc677e to your computer and use it in GitHub Desktop.

Select an option

Save EJSohn/da2b8fd31bfe4117d19913966adc677e to your computer and use it in GitHub Desktop.
func sumSlice(slice []int) int {
tot := 0
for _, val := range slice {
tot += val
}
return tot
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment