collections

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsElementsEquals

func IsElementsEquals[T comparable](a, b []T) bool

Will check is elements of 2 slice is equals with ignored order

func Map added in v0.0.30

func Map[T any, R any](values []T, fn func(i int, v T) R) (results []R)

func MapWithErr added in v0.0.30

func MapWithErr[T any, R any](values []T, fn func(i int, v T) (R, error)) (results []R, err error)

func Reduce added in v0.0.31

func Reduce[T any, R any](
	values []T,
	initial R,
	fn func(
		c R,
		i int,
		v T,
	) R,
) R

func ReduceWithErr added in v0.0.31

func ReduceWithErr[T any, R any](
	values []T,
	initial R,
	fn func(
		c R,
		i int,
		v T,
	) (R, error),
) (R, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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