Documentation ¶
Index ¶
- func Delete[T comparable](a []T, b ...T) []T
- func DeleteByIndex[T comparable](a []T, b int) []T
- func Difference[T comparable](a, b []T) []T
- func Intersection[T comparable](a, b []T) []T
- func IsIn[T interface{}](a []T, b T) bool
- func RandomSelection[T any](input []T, n int) []T
- func Union[T comparable](a, b []T) []T
- func Unique[T comparable](a []T) []T
- type IAny
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomSelection ¶ added in v0.9.5
随机选择 n 个元素并返回新的切片
Types ¶
Click to show internal directories.
Click to hide internal directories.