array

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](slice []T, filter filterFn[T]) []T

func ForEach

func ForEach[T any](
	slice []T,
	fn ForEachFn[T],
)

func From

func From[T any](
	length int,
	fn fromFn[T],
) []T

func Map

func Map[T any, R any](slice []T, mapper mapperFn[T, R]) []R

func Reduce

func Reduce[T any, R any](
	slice []T,
	reducer reduceFn[T, R],
	initial R,
) R

Types

type ForEachFn

type ForEachFn[T any] func(each *T, index int)

Jump to

Keyboard shortcuts

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