Skip to content
New issue

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

proposal: slices: Function to remove duplicates on a slice #63861

Closed
komisan19 opened this issue Nov 1, 2023 · 2 comments
Closed

proposal: slices: Function to remove duplicates on a slice #63861

komisan19 opened this issue Nov 1, 2023 · 2 comments
Labels
Milestone

Comments

@komisan19
Copy link
Contributor

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]
@gopherbot gopherbot added this to the Proposal milestone Nov 1, 2023
@raghvenders
Copy link
Contributor

Previous insights - #57241 (comment)

@seankhliao
Copy link
Member

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants