-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Description
How is NewSet different from NewSetWith?
Lines 178 to 180 in 645e1ba
| // NewSet creates and returns a reference to an empty set. Operations | |
| // on the resulting set are thread-safe. | |
| func NewSet(s ...interface{}) Set { |
Lines 188 to 190 in 645e1ba
| // NewSetWith creates and returns a new set with the given elements. | |
| // Operations on the resulting set are thread-safe. | |
| func NewSetWith(elts ...interface{}) Set { |
According to NewSet's documentation, it returns reference to an empty set. But that's not true. It returns reference to a set with all the items passed in parameters.
That's exactly what NewSetWith does. So how are they different?
Am i missing something here?
Metadata
Metadata
Assignees
Labels
No labels