Documentation
¶
Index ¶
- func AppendToSet[I comparable](sets ...map[I]struct{}) map[I]struct{}
- func ArrayToChannel[I any](array []I) chan I
- func ChannelToArray[I any](c chan I) []I
- func Intersection[T comparable](a, b []T) []T
- func Keys[I comparable, A any](m map[I]A) []I
- func Map[I any, O any](inputSlice []I, mapFn func(*I) O) []O
- func RemoveElementsFromArray[T any](indicesToRemove []int, array *[]T) error
- func SetDiff[I comparable](setA map[I]struct{}, setB map[I]struct{}) map[I]struct{}
- func SetSliceIntersection[T comparable](a map[T]struct{}, b []T) []T
- func SetToSlice[I comparable](set map[I]struct{}) []I
- func SliceDiff[T comparable](a, b []T) []T
- func SliceFullDiff(a, b []string) ([]string, []string)
- func SliceSetDiff[T comparable](a []T, b map[T]struct{}) []T
- func SliceToSet[I comparable](slice []I) map[I]struct{}
- func SplitIntoBucketsOfSize[T any](bucketSize int, array []T) [][]T
- func Values[I comparable, A any](m map[I]A) []A
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendToSet ¶
func AppendToSet[I comparable](sets ...map[I]struct{}) map[I]struct{}
func ArrayToChannel ¶
func ArrayToChannel[I any](array []I) chan I
func ChannelToArray ¶
func ChannelToArray[I any](c chan I) []I
func Intersection ¶
func Intersection[T comparable](a, b []T) []T
func Keys ¶
func Keys[I comparable, A any](m map[I]A) []I
func RemoveElementsFromArray ¶
func SetDiff ¶
func SetDiff[I comparable](setA map[I]struct{}, setB map[I]struct{}) map[I]struct{}
func SetSliceIntersection ¶
func SetSliceIntersection[T comparable](a map[T]struct{}, b []T) []T
func SetToSlice ¶
func SetToSlice[I comparable](set map[I]struct{}) []I
func SliceDiff ¶
func SliceDiff[T comparable](a, b []T) []T
SliceDiff returns the difference between the two slices. It returns the elements that appear in a but not in b
func SliceFullDiff ¶
SliceFullDiff returns the full difference between the two slices. The first return value are the elements that were added (in b but not in a), the second are the elements that were removed (in a but not in b)
func SliceSetDiff ¶
func SliceSetDiff[T comparable](a []T, b map[T]struct{}) []T
func SliceToSet ¶
func SliceToSet[I comparable](slice []I) map[I]struct{}
func SplitIntoBucketsOfSize ¶
func Values ¶
func Values[I comparable, A any](m map[I]A) []A
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.