diff --git a/iterator/set.go b/iterator/set.go index 9280342..6f1ba9d 100644 --- a/iterator/set.go +++ b/iterator/set.go @@ -24,14 +24,14 @@ func NewOrderedSet[T comparable]() *OrderedSet[T] { return &OrderedSet[T]{make([]T, 0), NewSet[T]()} } -func (s Set[T]) FromSlice(data []T) { - for v := range slices.Values(data) { +func (s Set[T]) FromSlice(slice []T) { + for v := range slices.Values(slice) { s.Add(v) } } -func (s *OrderedSet[T]) FromSlice(data []T) { - for v := range slices.Values(data) { +func (s *OrderedSet[T]) FromSlice(slice []T) { + for v := range slices.Values(slice) { s.Add(v) } }