utils

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

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[T any](slice []T, tester func(t T) bool) []T

func Flatten

func Flatten[T comparable, V any, M any](m map[T]V, flatterner func(V) M) []M

transform map to array

func Map

func Map[T any, M any](s []T, f func(T) M) []M

func Reduce

func Reduce[T any, M any](s []T, f func(M, T) M, initValue M) M

Types

type ByteValue

type ByteValue int64

func (ByteValue) String

func (r ByteValue) String() string

type Queue

type Queue[T any] []T

func (*Queue[T]) Pop

func (r *Queue[T]) Pop()

func (*Queue[T]) Push

func (r *Queue[T]) Push(a T)

Jump to

Keyboard shortcuts

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