Documentation
¶
Overview ¶
Package set implements a generic set type. Finally! https://en.wikipedia.org/wiki/Set_(mathematics)
Index ¶
- type Set
- func (s Set[T]) Add(items ...T) Set[T]
- func (s Set[T]) AddIter(it iter.Seq[T]) Set[T]
- func (s Set[T]) All() iter.Seq[T]
- func (s Set[T]) Clear() Set[T]
- func (s Set[T]) Contains(item T) bool
- func (s Set[T]) Difference(that Set[T]) (result Set[T])
- func (s Set[T]) Empty() bool
- func (s Set[T]) Equal(that Set[T]) bool
- func (s Set[T]) Intersection(that Set[T]) (result Set[T])
- func (s Set[T]) IsSubset(that Set[T]) bool
- func (s Set[T]) IsSuperset(that Set[T]) bool
- func (s Set[T]) Len() int
- func (s Set[T]) Remove(items ...T) Set[T]
- func (s Set[T]) RemoveIter(it iter.Seq[T]) Set[T]
- func (s Set[T]) Slice() (result []T)
- func (s Set[T]) SymmetricDifference(that Set[T]) (result Set[T])
- func (s Set[T]) Union(that Set[T]) (result Set[T])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T comparable] map[T]struct{}
func Make ¶
func Make[T comparable](size int) Set[T]
func Of ¶
func Of[T comparable](items ...T) (result Set[T])
func (Set[T]) Difference ¶
func (Set[T]) Intersection ¶
func (Set[T]) IsSuperset ¶
func (Set[T]) SymmetricDifference ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
should
Package should info: github.com/mdwhatcott/[email protected] (a little copy-paste is better than a little dependency) AUTO-GENERATED: 2023-01-16 10:47:35.113741 -0700 MST m=+0.000358543
|
Package should info: github.com/mdwhatcott/[email protected] (a little copy-paste is better than a little dependency) AUTO-GENERATED: 2023-01-16 10:47:35.113741 -0700 MST m=+0.000358543 |
Click to show internal directories.
Click to hide internal directories.