functools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[T any](condition func(T) bool, entry []T) bool

func Any

func Any[T any](condition func(T) bool, entry []T) bool

func Count

func Count[T any](entry []T, value T) (count int)

func CountBy

func CountBy[T any](entry []T, condition func(T) bool) (count int)

func Equal

func Equal[T any](a, b T, cmp func(T, T) int) bool

func Equals

func Equals[T any](cmp func(T, T) int, v ...T) bool

func Filter

func Filter[T any](condition func(T) bool, entry []T) []T

func Greater

func Greater[T any](a, b T, cmp func(T, T) int) bool

func IsDecreasing

func IsDecreasing[T any](entry []T, cmp func(T, T) int, strict bool) bool

func IsIncreasing

func IsIncreasing[T any](entry []T, cmp func(T, T) int, strict bool) bool

func IsMonotonic

func IsMonotonic[T any](entry []T, cmp func(T, T) int, strict bool) bool

func IsSorted

func IsSorted[T any](entry []T, cmps ...func(a, b T) int) bool

func Less

func Less[T any](a, b T, cmp func(T, T) int) bool

func Map

func Map[E, R any](handler func(E) R, entry []E) []R

func Maps

func Maps[T, U, R any](handler func(T, U) R, entry1 []T, entry2 []U) (output []R, err error)

func Max

func Max[T any](cmp func(T, T) int, v ...T) T

func Min

func Min[T any](cmp func(T, T) int, v ...T) T

func Reduce

func Reduce[T any](handler func(T, T) T, entry []T, initial ...T) (result T, err error)

func Sort

func Sort[T any](entry []T, cmps ...func(a, b T) int)

func Sorted

func Sorted[T any](entry []T, cmps ...func(a, b T) int) []T

Types

This section is empty.

Jump to

Keyboard shortcuts

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