It would be nice to be able to transform a Set of type T into another Set of type U. Ideally this could be a method on Set, but Go generics aren't able to do that (yet?), so these would need to be package level helper functions, e.g.
func Transform[A, B comparable](s *Set[A]) *Set[B]
and
func TransformSlice[A comparable, B any](s *Set[A]) []B
It would be nice to be able to transform a Set of type T into another Set of type U. Ideally this could be a method on Set, but Go generics aren't able to do that (yet?), so these would need to be package level helper functions, e.g.
func Transform[A, B comparable](s *Set[A]) *Set[B]
and
func TransformSlice[A comparable, B any](s *Set[A]) []B