Documentation ¶
Index ¶
- func Eq[T comparable](x T) pipe.Predicate[T]
- func IsNil[T any](x *T) bool
- func Less[T constraints.Ordered](x, y *T) bool
- func LessThan[T constraints.Ordered](x T) pipe.Predicate[T]
- func Not[T any](fn func(x T) bool) func(T) bool
- func NotEq[T comparable](x T) pipe.Predicate[T]
- func NotNil[T any](x *T) bool
- func NotZero[T comparable](x *T) bool
- func Nott[T1, T2 any](fn func(x T1, y T2) bool) func(T1, T2) bool
- func Nottt[T1, T2, T3 any](fn func(x T1, y T2, z T3) bool) func(T1, T2, T3) bool
- func Sum[T cns.Float | cns.Integer | cns.Complex](a, b *T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eq ¶
func Eq[T comparable](x T) pipe.Predicate[T]
Eq returns a predicate which is true when the argument is equal to x.
func Less ¶
func Less[T constraints.Ordered](x, y *T) bool
Less returns true if x < y, false otherwise.
func LessThan ¶
func LessThan[T constraints.Ordered](x T) pipe.Predicate[T]
LessThan returns a predicate which is true when the argument is less than x.
func Not ¶ added in v1.0.2
Not returns a new function that negates the result of the input function.
func NotEq ¶
func NotEq[T comparable](x T) pipe.Predicate[T]
NotEq returns a predicate which is true when the argument is NOT equal to x.
func NotNil ¶
NotNil returns true is x underlying value is not nil. It uses reflection, so if you don't store any pointers, better use NotZero.
func NotZero ¶
func NotZero[T comparable](x *T) bool
NotZero returns true is x equals to a default zero value of the type T.
func Nott ¶ added in v1.0.2
Nott returns a new function that negates the result of the input function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.