array

package module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 1 Imported by: 1

README

Go Array Utils

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func Equal

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

func Filter

func Filter[T any](array []T, callback func(item T) bool) []T

func Find

func Find[T any](array []T, callback func(item T) bool) (*T, error)

func ForEach

func ForEach[T any](array []T, callback func(item T))

func Map

func Map[T any, U any](array []T, callback func(item T) U) []U

func Reduce

func Reduce[T any, U any](array []T, callback func(target U, item T) U, target U) U

Types

This section is empty.

Jump to

Keyboard shortcuts

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