slice

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chunk

func Chunk(items []any, size int) [][]any

func Concat

func Concat(slices [][]any) []any

func Contains

func Contains(items []any, value any) bool

func Drop

func Drop(items []any, n int) []any

func DropLast

func DropLast(items []any, n int) []any

func Filter

func Filter(items []any, predicate func(any) bool) []any

func Find

func Find(items []any, predicate func(any) bool) (any, error)

func FindIndex

func FindIndex(items []any, predicate func(any) bool) int

func FindLast

func FindLast(items []any, predicate func(any) bool) (any, error)

func FindLastOr

func FindLastOr(items []any, predicate func(any) bool, defaultValue any) any

func FindOr

func FindOr(items []any, predicate func(any) bool, defaultValue any) any

func First

func First(items []any, n int) []any

func FirstOne

func FirstOne(items []any) (any, error)

func FirstOr

func FirstOr(items []any, defaultValue any) any

func Get

func Get(items []any, index int) (any, error)

func GetOr

func GetOr(items []any, index int, defaultValue any) any

func GroupBy

func GroupBy[T any, K comparable](items []T, keyFunc func(T) K) map[K][]T

func IndexOf

func IndexOf(items []any, value any) int

func IsEmpty

func IsEmpty(items []any) bool

func IsNotEmpty

func IsNotEmpty(items []any) bool

func Last

func Last(items []any, n int) []any

func LastOne

func LastOne(items []any) (any, error)

func LastOr

func LastOr(items []any, defaultValue any) any

func Map

func Map(items []any, transform func(any) any) []any

func Pop

func Pop(items []any) (any, []any, error)

func Reverse

func Reverse(items []any) []any

func Shift

func Shift(items []any) (any, []any, error)

func Unique

func Unique(items []any) []any

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL