Documentation
¶
Index ¶
- func Add(a int, b int) int
- func At[T comparable](s []T, i int) (*T, error)
- func Concat[T comparable](s1 []T, s2 ...[]T) []T
- func ConcatMut[T comparable](s1 *[]T, s2 ...[]T)
- func Every[T comparable](s []T, f Predicate[T]) bool
- func Fill[T comparable](s []T, el T, startPos, endPos uint) ([]T, error)
- func Filter[T comparable](s []T, f Predicate[T]) []T
- func Find[T comparable](s []T, f Predicate[T]) (*T, error)
- func FindIndex[T comparable](s []T, f Predicate[T]) int
- func FindLast[T comparable](s []T, f Predicate[T]) (*T, error)
- func FindLastIndex[T comparable](s []T, f Predicate[T]) int
- func Flat[T comparable](s [][]T) []T
- func ForEach[T comparable](s []T, f ForEachFunc[T])
- func Includes[T comparable](s []T, e T) bool
- func IndexOf[T comparable](s []T, e T) int
- func Map[T comparable](s []T, f MapFunc[T]) []any
- func MapMut()
- func Pop[T comparable](s []T, defaultValue T) ([]T, T, error)
- func PopMut[T comparable](s *[]T, defaultValue T) (T, error)
- func Push[T comparable](s []T, e T) []T
- func PushMut[T comparable](s *[]T, e T)
- func Reduce[T comparable](s []T, f ReduceFunc[T], defaultValue any) any
- func ReduceStrict[T comparable, K comparable](s []T, f ReduceStrictFunc[T, K], defaultValue K) K
- func Reverse[T comparable](s []T) []T
- func Shift[T comparable](s []T, defaultValue T) ([]T, T, error)
- func ShiftMut[T comparable](s *[]T, defaultValue T) (T, error)
- func Slice[T comparable](s []T, begin, end int) []T
- func Some[T comparable](s []T, f Predicate[T]) bool
- func UnShift[T comparable](s []T, e T) []T
- func UnShiftMut[T comparable](s *[]T, e T)
- type Entry
- type ForEachFunc
- type MapFunc
- type Predicate
- type ReduceFunc
- type ReduceStrictFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func At ¶
func At[T comparable](s []T, i int) (*T, error)
func Concat ¶
func Concat[T comparable](s1 []T, s2 ...[]T) []T
func ConcatMut ¶
func ConcatMut[T comparable](s1 *[]T, s2 ...[]T)
func Every ¶
func Every[T comparable](s []T, f Predicate[T]) bool
func Fill ¶
func Fill[T comparable](s []T, el T, startPos, endPos uint) ([]T, error)
func Filter ¶
func Filter[T comparable](s []T, f Predicate[T]) []T
func Find ¶
func Find[T comparable](s []T, f Predicate[T]) (*T, error)
func FindIndex ¶
func FindIndex[T comparable](s []T, f Predicate[T]) int
func FindLast ¶
func FindLast[T comparable](s []T, f Predicate[T]) (*T, error)
func FindLastIndex ¶
func FindLastIndex[T comparable](s []T, f Predicate[T]) int
func Flat ¶
func Flat[T comparable](s [][]T) []T
func ForEach ¶
func ForEach[T comparable](s []T, f ForEachFunc[T])
func Includes ¶
func Includes[T comparable](s []T, e T) bool
func IndexOf ¶
func IndexOf[T comparable](s []T, e T) int
func Map ¶
func Map[T comparable](s []T, f MapFunc[T]) []any
func Pop ¶
func Pop[T comparable](s []T, defaultValue T) ([]T, T, error)
func PopMut ¶
func PopMut[T comparable](s *[]T, defaultValue T) (T, error)
func Push ¶
func Push[T comparable](s []T, e T) []T
func PushMut ¶
func PushMut[T comparable](s *[]T, e T)
func Reduce ¶
func Reduce[T comparable](s []T, f ReduceFunc[T], defaultValue any) any
func ReduceStrict ¶
func ReduceStrict[T comparable, K comparable](s []T, f ReduceStrictFunc[T, K], defaultValue K) K
func Reverse ¶
func Reverse[T comparable](s []T) []T
func Shift ¶
func Shift[T comparable](s []T, defaultValue T) ([]T, T, error)
func ShiftMut ¶
func ShiftMut[T comparable](s *[]T, defaultValue T) (T, error)
func Slice ¶
func Slice[T comparable](s []T, begin, end int) []T
func Some ¶
func Some[T comparable](s []T, f Predicate[T]) bool
func UnShift ¶
func UnShift[T comparable](s []T, e T) []T
func UnShiftMut ¶
func UnShiftMut[T comparable](s *[]T, e T)
Types ¶
type Entry ¶
type Entry[T comparable] struct { // contains filtered or unexported fields }
func Entries ¶
func Entries[T comparable](s []T) []Entry[T]
type ForEachFunc ¶
type ForEachFunc[T comparable] func(e T, i int, s []T)
type MapFunc ¶
type MapFunc[T comparable] func(e T, i int, s []T) any
type Predicate ¶
type Predicate[T comparable] func(e T, i int, s []T) bool
type ReduceFunc ¶
type ReduceFunc[T comparable] func(acc any, e T, i int, s []T) any
type ReduceStrictFunc ¶
type ReduceStrictFunc[T comparable, K comparable] func(acc K, e T, i int, s []T) K
Click to show internal directories.
Click to hide internal directories.