henry icon indicating copy to clipboard operation
henry copied to clipboard

support sets

Open J-Zeitler opened this issue 2 months ago • 1 comments

considerations:

  • this implementation clashes a bit with slicez.Set()
  • current implementation follows rest of the convention in the lib, could instead/also expose methods on the generic Set type

J-Zeitler avatar Oct 27 '25 16:10 J-Zeitler

Not against it, slicez.Set() is map[E comparable]bool to have a map behave like a Set.

For performance reasons the setz package seems resonable, supporting mutations. But is the bool vs struct that much different or it the reason looking for eg effective Intersection, Difference and so on operations? If so, that might be a good reason to add them on a key level on in mapz instead?

crholm avatar Oct 27 '25 16:10 crholm