Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
func Difference[V comparable](a, b []V) []V
Difference returns a slice that contains all elements of the first input slice without the elements of the second input slice
func Intersection ¶
func Intersection[V comparable](a, b []V) []V
Intersection returns a slice that contains all elements that are contained in both slices
func Remove ¶
func Remove[T comparable](items []T, toRemove T) ([]T, bool)
Remove removes the first occurrence of the input item from the input slice
Types ¶
type SortedSlice ¶ added in v0.5.2
type SortedSlice[T constraints.Ordered] []T
func (*SortedSlice[T]) Add ¶ added in v0.5.2
func (s *SortedSlice[T]) Add(t T)
Click to show internal directories.
Click to hide internal directories.