slicex

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DifferenceSet

func DifferenceSet[T cmp.Ordered](a, b []T) []T

DifferenceSet 差集--以左边为主

func DifferenceSetAll

func DifferenceSetAll[T cmp.Ordered](a, b []T) []T

DifferenceSetAll 差集全量

func DifferenceSetAllFunc

func DifferenceSetAllFunc[T any](a, b []T, f func(a T) any) []T

DifferenceSetAllFunc 任意类型差集全量

func DifferenceSetRight

func DifferenceSetRight[T cmp.Ordered](a, b []T) []T

DifferenceSetRight 差集--以右边为主

func Distinct added in v0.0.2

func Distinct[T cmp.Ordered](a []T) []T

Distinct 去重

func DistinctFunc added in v0.0.2

func DistinctFunc[T any](a []T, f func(a T) any) []T

func Intersection

func Intersection[T cmp.Ordered](a, b []T) []T

Intersection 无重复交集--其返回结果无重复元素

func IntersectionFunc

func IntersectionFunc[T any](a, b []T, f func(a T) any) []T

IntersectionFunc 任意类型交集 --无重复

func IntersectionRepeat

func IntersectionRepeat[T cmp.Ordered](a, b []T) []T

IntersectionRepeat 有重复交集--其返回结果有重复元素

func UnionSetRepeat

func UnionSetRepeat[T cmp.Ordered](a, b []T) []T

UnionSetRepeat 并集 有重复元素

func UnionSetUnique

func UnionSetUnique[T cmp.Ordered](a, b []T) []T

UnionSetUnique 并集 无重复元素

func UnionSetUniqueFunc

func UnionSetUniqueFunc[T any](a, b []T, f func(a T) any) []T

UnionSetUniqueFunc 任意类型并集 --无重复

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL