utils

package module
v0.0.0-...-dcdfa3e Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 1 Imported by: 0

README

Utils

Basic Util functions that i've been reusing a lot in other projects.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionWG

func ActionWG(actions []func())

func Filter

func Filter[T any](arr []T, test func(T) bool) (output []T)

func FilterWG

func FilterWG[T any](arr []T, test func(T) bool) (result []T)

func For

func For(size int, action func(int))

func ForEach

func ForEach[T any](arr []T, action func(T))

func ForEachWG

func ForEachWG[T any](arr []T, action func(T))

func ForSquare

func ForSquare(size int, action func(int, int))

func Map

func Map[T any, U any](arr []T, action func(T) U) (output []U)

func MapWG

func MapWG[T any, U any](arr []T, action func(T) U) (result []U)

func OrderedMapWG

func OrderedMapWG[T any, U any](arr []T, action func(T) U) []U

Types

type Pair

type Pair[T any, U any] struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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