Documentation
¶
Index ¶
- func GetDifference[T comparable](setA, setB []T) (difference []T)
- func GetIntersection[T comparable](setA, setB []T) (intersection []T)
- func GetUnion[T comparable](setA, setB []T) (union []T)
- func Max[T constraints.Ordered](values ...T) (T, error)
- func Min[T constraints.Ordered](values ...T) (T, error)
- func Ternary[V any](condition bool, T, F V) V
- func TernaryFunc[V any](condition func() bool, T V, F V) V
- func TernaryFuncAll[V any](condition func() bool, trueFn func() V, falseFn func() V) V
- func TernaryFuncReturn[V any](condition bool, trueFn func() V, falseFn func() V) V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDifference ¶
func GetDifference[T comparable](setA, setB []T) (difference []T)
GetDifference 获取两个数组的差集
func GetIntersection ¶
func GetIntersection[T comparable](setA, setB []T) (intersection []T)
GetIntersection 获取两个数组的交集
func TernaryFunc ¶
TernaryFunc 三元运算:通过回调函数
func TernaryFuncAll ¶
TernaryFuncAll 三元运算:通过回调函数,返回值也使用回调函数
func TernaryFuncReturn ¶
TernaryFuncReturn 三元运算:返回值使用回调方法
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.