arrayutils

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distinct

func Distinct[S ~[]E, E comparable](s S) []E

func Filter

func Filter[T any](arr []T, fn func(T) bool) []T

Filter a function that takes an array and filters it by callback

func MapValues added in v0.15.6

func MapValues[T interface{}](values []T, mapFunc func(T) T) []T

MapValues a function to iterate through an array of elements and apply a callback to each element

func MaxInt

func MaxInt(arr []int) int

MaxInt function to find the maximum number in an array

func MinInt

func MinInt(arr []int) int

MinInt function to find the minimum number in an array

Types

This section is empty.

Jump to

Keyboard shortcuts

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