goBasicFunctions

package module
v0.0.0-...-5d4a4ed Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[T any](values []T, fn func(T) bool) bool

func Any

func Any[T any](values []T, fn func(T) bool) bool

func AnyIdx

func AnyIdx[T any](values []T, fn func(T, int) bool) bool

func AssertEquality

func AssertEquality[T any, U any](left T, right U)

func CopyFromWithin

func CopyFromWithin[T any](values *[]T, start int, end int)

func FolgRight

func Flatten[T any](values []T) T {

}

func Filter

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

func Fold

func Fold[T any, U any](init U, values []T, fn func(T, int) U) U

func Map

func Map[T any, U any](values []T, fn func(T) U) []U

func Max

func Max[T Ordered](values []T) (T, error)

func Min

func Min[T Ordered](values []T) (T, error)

func Product

func Product[T Complex](values []T) T

func Splice

func Splice[T any](values *[]T, start int, end int, insert ...T) []T

func Sum

func Sum[T Complex](values []T) T

func ToReversed

func ToReversed[T any](v []T) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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