Versions in this module Expand all Collapse all v0 v0.0.9 Apr 16, 2024 Changes in this version + func ToMapV[Ele any, Key comparable, Val any](elements []Ele, fn func(element Ele) (Key, Val)) (resultMap map[Key]Val) + func ToMap[Ele any, Key comparable](elements []Ele, fn func(element Ele) Key) map[Key]Ele v0.0.8 Sep 25, 2023 Changes in this version + func Add(src []Src, element Src, index int) ([]Src, error) + func Find(src []T, match matchFunc[T]) (T, bool) + func FindAll(src []T, match matchFunc[T]) []T v0.0.7 Apr 13, 2023 Changes in this version + func Contains(src []T, dst T) bool + func ContainsAll(src, dst []T) bool + func ContainsAllFunc(src, dst []T, equal equalFunc[T]) bool + func ContainsAny(src, dst []T) bool + func ContainsAnyFunc(src, dst []T, equal equalFunc[T]) bool + func ContainsFunc(src []T, dst T, equal equalFunc[T]) bool + func Delete(src []Src, index int) ([]Src, error) + func DiffSet(src, dst []T) []T + func DiffSetFunc(src, dst []T, equal equalFunc[T]) []T + func FilterDelete(src []Src, m func(idx int, src Src) bool) []Src + func FilterMap(src []Src, m func(idx int, src Src) (Dst, bool)) []Dst + func Index(src []T, dst T) int + func IndexAll(src []T, dst T) []int + func IndexAllFunc(src []T, dst T, equal equalFunc[T]) []int + func IndexFunc(src []T, dst T, equal equalFunc[T]) int + func IntersectSet(src []T, dst []T) []T + func IntersectSetFunc(src []T, dst []T, equal equalFunc[T]) []T + func LastIndex(src []T, dst T) int + func LastIndexFunc(src []T, dst T, equal equalFunc[T]) int + func Map(src []Src, m func(idx int, src Src) Dst) []Dst + func Max(ts []T) T + func Min(ts []T) T + func Reverse(src []T) []T + func ReverseSelf(src []T) + func Sum(ts []T) T + func SymmetricDiffSet(src, dst []T) []T + func SymmetricDiffSetFunc(src, dst []T, equal equalFunc[T]) []T + func UnionSet(src, dst []T) []T + func UnionSetFunc(src, dst []T, equal equalFunc[T]) []T