Created
November 5, 2014 12:54
-
-
Save gerep/b09a3e2394c1b211dca0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
scores := []int{1,2,3,4,5} | |
scores = removeAtIndex(scores, 2) | |
} | |
func removeAtIndex(source []int, index int) []int { | |
source = append(source[:index], source[index+1:]...) | |
return source | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment