Documentation
¶
Index ¶
- func Collect[T, U any](seq2 iter.Seq2[T, U]) ([]T, []U)
- func Concat[T any](slice1, slice2 []T) []T
- func Filter[T any](slice []T, p func(T) bool) []T
- func FlatMap[T, U any](slice []T, f func(T) []U) []U
- func Flatten[T any](slices [][]T) []T
- func FoldLeft[T any, U any](slice []T, f func(u U, t T) U, u U) U
- func FoldRight[T any, U any](slice []T, f func(t T, u U) U, u U) U
- func Join[T ~string](strings []T, sep T) T
- func JoinErrs(errs []error) error
- func Map[T any, U any](slice []T, f func(T) U) []U
- func Partition[T any](slice []T, size int) [][]T
- func Reduce[T any](slice []T, op func(t1, t2 T) T, initial T) T
- func Sum[M Monad](numbers []M) M
- func UnZip[T, U any](slice []Pair[T, U]) ([]T, []U)
- type Monad
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Monad ¶
type Monad interface { constraints.Integer | constraints.Float | constraints.Complex | ~string }
Monad represents any type that can use the `+` operator and whose zero value is the identity element the `+` operator
Click to show internal directories.
Click to hide internal directories.