Documentation ¶
Index ¶
- func Comparable[T any](v T) bool
- func Eq[T comparable](t T) func(T) bool
- func Eqd[T any](t T) func(T) bool
- func Even[T constraints.Integer](int T) bool
- func Gt[T cmp.Ordered](t T) func(T) bool
- func Gte[T cmp.Ordered](t T) func(T) bool
- func Lt[T cmp.Ordered](t T) func(T) bool
- func Lte[T cmp.Ordered](t T) func(T) bool
- func Ne[T comparable](t T) func(T) bool
- func Ned[T any](t T) func(T) bool
- func Odd[T constraints.Integer](int T) bool
- func Zero[T cmp.Ordered](v T) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Comparable ¶ added in v1.0.68
Comparable reports whether the value v is comparable.
func Eq ¶
func Eq[T comparable](t T) func(T) bool
Eq returns a comparison function that evaluates to true when a value is equal to the provided threshold.
func Eqd ¶ added in v1.0.68
Eqd returns a comparison function that evaluates to true when a value is deeply equal to the provided threshold.
func Even ¶ added in v1.0.68
func Even[T constraints.Integer](int T) bool
Even is a generic function that checks if the provided integer is even.
func Gt ¶
Gt returns a comparison function that evaluates to true when a value is greater than the threshold.
func Gte ¶ added in v1.0.68
Gte returns a comparison function that evaluates to true when a value is greater than or equal to the threshold.
func Lt ¶
Lt returns a comparison function that evaluates to true when a value is less than the threshold.
func Lte ¶ added in v1.0.68
Lte returns a comparison function that evaluates to true when a value is less than or equal to the threshold.
func Ne ¶
func Ne[T comparable](t T) func(T) bool
Ne returns a comparison function that evaluates to true when a value is not equal to the provided threshold.
func Ned ¶ added in v1.0.68
Ned returns a comparison function that evaluates to true when a value is not deeply equal to the provided threshold.
func Odd ¶ added in v1.0.68
func Odd[T constraints.Integer](int T) bool
Odd is a generic function that checks if the provided integer is odd.
Types ¶
This section is empty.