Documentation
¶
Overview ¶
Package set provides a simple set type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[E comparable] struct { // contains filtered or unexported fields }
Set is an unordered collection of non-duplicate elements.
func New ¶
func New[E comparable](elems ...E) *Set[E]
New creates a new set with the given elements.
func (*Set[E]) Contains ¶
Contains returns true, if the set contains the element.
func (*Set[E]) Equal ¶
Equal returns true if both sets contain the same elements.
func (*Set[E]) Length ¶
Length returns the number of elements in the set.
Click to show internal directories.
Click to hide internal directories.