util

package
v0.0.0-...-1e7a838 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply[T any](in []T, f func(T))

func Combinations

func Combinations[T any](in []T, r int) (out [][]T)

func Cycle

func Cycle[T any](in []T) <-chan T

func Filter

func Filter[T any](in []T, f func(T) bool) (out []T)

func Group

func Group[T any](s []T, n int) (out [][]T)

func Map

func Map[T1, T2 any](in []T1, f func(T1) T2) (out []T2)

func Max

func Max[T ~int | ~float32 | ~float64](in ...T) (out T)

func Min

func Min[T ~int | ~float32 | ~float64](in ...T) (out T)

func Must

func Must[T any](r T, err error) T

func Reduce

func Reduce[T any](in []T, f func(a, b T) T, acc T) T

func SlurpInt

func SlurpInt(s string) (out []int, err error)

func Split

func Split[T any](in []T, f func(T) bool) (head, tail []T)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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