Documentation
¶
Index ¶
- func All[T comparable](x T, vs []T) bool
- func AllFn[T comparable](fn func(T) bool, vs []T) bool
- func AllFnV[T comparable](fn func(T) bool, vs ...T) bool
- func AllV[T comparable](x T, vs ...T) bool
- func Chunk[T comparable](xs []T, size int) [][]T
- func Contains[T comparable](xs []T, v T) bool
- func ContainsFn[T comparable](xs []T, fn func(T) bool) bool
- func Diff[T comparable](as, bs []T) []T
- func DiffFn[T any](as, bs []T, fn func(T, T) bool) []T
- func Distinct[T comparable](xs []T) []T
- func Each[T any](ts []T, fn func(T))
- func EachErr[T any](ts []T, fn func(T) error) error
- func Equals[T comparable](as, bs []T) bool
- func EqualsFn[T comparable](as, bs []T, fn func(T, T) bool) bool
- func Exist[T comparable](ss []T, s T) bool
- func ExistFn[T any](ss []T, fn func(T) bool) bool
- func Filter[T any](xs []T, fn FilterFn[T]) []T
- func FilterErr[T any](xs []T, fn FilterErrFn[T]) ([]T, error)
- func FilterTry[T any](xs []T, fn FilterErrFn[T]) trier.Try[[]T]
- func Find[T comparable](ss []T, t T) (T, bool)
- func FindFn[T any](ss []T, fn func(T) bool) (T, bool)
- func Flatten[T any](vss ...[]T) []T
- func FlattenFn[T any, U any](fn func(vs []T) []U, vss ...[]T) []U
- func Head[V any](vs []V) V
- func HeadO[V any](vs []V) optioner.Option[V]
- func HeadV[V any](vs ...V) V
- func HeadVO[V any](vs ...V) optioner.Option[V]
- func Join[T any](elems []T, sep string) string
- func Map[T any, U any](ts []T, fn func(T) U) []U
- func MapErr[T any, U any](ts []T, fn func(T) (U, error)) ([]U, error)
- func Max[V Numeric](vs []V) V
- func Mean[V Numeric](vs []V) V
- func Min[V Numeric](vs []V) V
- func Reduce[V any, A any](initial A, vs []V, fn func(V, A) A) A
- func ReduceErr[V any, A any](vs []V, fn func(V, A) (A, error), s A) (A, error)
- func ReduceTry[V any, A any](vs []V, fn func(V, A) (A, error), initial A) trier.Try[A]
- func Sum[V Numeric](vs []V) V
- func Tail[V any](vs []V) V
- func TailO[V any](vs []V) optioner.Option[V]
- func TailV[V any](vs ...V) V
- func TailVO[V any](vs ...V) optioner.Option[V]
- func Times[V any, O any](v V, s int, fn func(V) O) []O
- type FilterErrFn
- type FilterFn
- type Numeric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
func All[T comparable](x T, vs []T) bool
func AllFn ¶
func AllFn[T comparable](fn func(T) bool, vs []T) bool
func AllFnV ¶
func AllFnV[T comparable](fn func(T) bool, vs ...T) bool
func AllV ¶
func AllV[T comparable](x T, vs ...T) bool
func Chunk ¶
func Chunk[T comparable](xs []T, size int) [][]T
func Contains ¶
func Contains[T comparable](xs []T, v T) bool
func ContainsFn ¶
func ContainsFn[T comparable](xs []T, fn func(T) bool) bool
func Diff ¶
func Diff[T comparable](as, bs []T) []T
func Distinct ¶
func Distinct[T comparable](xs []T) []T
func Equals ¶
func Equals[T comparable](as, bs []T) bool
func EqualsFn ¶
func EqualsFn[T comparable](as, bs []T, fn func(T, T) bool) bool
func Exist ¶
func Exist[T comparable](ss []T, s T) bool
func FilterErr ¶
func FilterErr[T any](xs []T, fn FilterErrFn[T]) ([]T, error)
func FilterTry ¶
func FilterTry[T any](xs []T, fn FilterErrFn[T]) trier.Try[[]T]
func Find ¶
func Find[T comparable](ss []T, t T) (T, bool)
Types ¶
type FilterErrFn ¶
Click to show internal directories.
Click to hide internal directories.