golang-set icon indicating copy to clipboard operation
golang-set copied to clipboard

why isn't there a `mapset.NewSetFromSlice` method?

Open ibukunoluwayomi opened this issue 1 year ago • 1 comments

Just like mapset.NewSetFromMapKeys() which is very handy. I think mapset.NewSetFromSlice will be quite helpful

ibukunoluwayomi avatar Apr 11 '24 21:04 ibukunoluwayomi

Hello,

I believe we used to have such methods but they've been streamlines by having some of the New* functions be variadic which means you can still pass a slice in and would just need to expand it with the .. syntax.

Let me know if that is what you're looking for.

Thanks,

-Deckarep

deckarep avatar Apr 11 '24 23:04 deckarep