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 Dedup[T comparable](items []T) []T
- func DedupFn[T any, K comparable](items []T, fn func(T) K) []T
- 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 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](items ...[]T) []T
- func FlattenFn[T any, U any](fn func(vs []T) []U, vss ...[]T) []U
- func FoldErr[I any, O any](initial O, vs []I, fn func(O, I) (O, error)) (O, error)
- func FoldIndexed[I any, O any](initial O, vs []I, fn func(int, O, I) O) O
- func FoldLeft[I any, O any](initial O, vs []I, fn func(O, I) O) O
- func FoldLeftErr[I any, O any](initial O, vs []I, fn func(O, I) (O, error)) (O, error)
- func FoldLeftIndexed[I any, O any](initial O, vs []I, fn func(int, O, I) O) O
- func FoldRight[I any, O any](initial O, vs []I, fn func(O, I) O) O
- func FoldRightErr[I any, O any](initial O, items []I, fn func(O, I) (O, error)) (O, error)
- func FoldRightIndexed[I any, O any](initial O, items []I, fn func(int, O, I) O) O
- func Head[V any](items []V) V
- func HeadV[V any](items ...V) V
- func Join[T any](items []T, sep string) string
- func JoinErrFn[T any](items []T, sep string, fn func(T) (string, error)) (string, error)
- func JoinFn[T any](items []T, sep string, fn func(T) string) string
- func Last[V any](vs []V) V
- func LastV[V any](vs ...V) V
- func Map[T any, U any](items []T, fn func(T) U) []U
- func MapErr[T any, U any](items []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](items []V) []V
- func TailV[V any](items ...V) []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 Dedup ¶
func Dedup[T comparable](items []T) []T
func DedupFn ¶
func DedupFn[T any, K comparable](items []T, fn func(T) K) []T
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 Find ¶
func Find[T comparable](ss []T, t T) (T, bool)
func FoldIndexed ¶
func FoldLeftErr ¶
func FoldLeftIndexed ¶
func FoldRightErr ¶
func FoldRightIndexed ¶
Types ¶
type FilterErrFn ¶
Click to show internal directories.
Click to hide internal directories.