We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I propose adding to package slices
func Duplicate[S []E, E comparable](a S) S
An example of the Duplicate function is like this:
array := []int{1,2,2,3,4,5} slices.Duplicate(array) // output: [1 2 3 4 5]
The text was updated successfully, but these errors were encountered:
Previous insights - #57241 (comment)
Sorry, something went wrong.
see https://pkg.go.dev/slices#Compact
No branches or pull requests
I propose adding to package slices
An example of the Duplicate function is like this:
The text was updated successfully, but these errors were encountered: